1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 10:52:41 +01:00
phorge-phorge/resources/sql/autopatches/20150430.calendar.1.policies.sql
lkassianik 11e8e60245 Calendar events should have edit/view policies
Summary: Closes T7940, Calendar events should have edit/view policies.

Test Plan: Create new event and save, event should be only visible and editable by creator. Editing policies should correctly set the permissions of editing/viewing the event.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7940

Differential Revision: https://secure.phabricator.com/D12632
2015-04-30 14:43:48 -07:00

11 lines
354 B
SQL

ALTER TABLE {$NAMESPACE}_calendar.calendar_event
ADD viewPolicy varbinary(64) NOT NULL;
ALTER TABLE {$NAMESPACE}_calendar.calendar_event
ADD editPolicy varbinary(64) NOT NULL;
UPDATE {$NAMESPACE}_calendar.calendar_event
SET viewPolicy = 'users' WHERE viewPolicy = '';
UPDATE {$NAMESPACE}_calendar.calendar_event
SET editPolicy = userPHID;