1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 00:10:57 +01:00
phorge-phorge/resources/sql/patches/policy-project.sql
epriestley bd0be1c650 Add View, Edit and Join policies to PhabricatorProject
Summary:
  - In ProjectQuery, always load the viewer's membership in the project because we need it to perform a CAN_VIEW test.
  - Add storage for the view, edit and join policies.
  - A user can always view a project if they are a member.
  - A user can always join a project if they can edit it.
  - Editing a project requires both "view" and "edit" permissions, and edit does not imply view.
  - This has no effect on the application yet.

Test Plan: See next diff.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3219
2012-08-11 07:05:01 -07:00

8 lines
284 B
SQL

ALTER TABLE `{$NAMESPACE}_project`.`project`
ADD `viewPolicy` varchar(64) COLLATE utf8_bin;
ALTER TABLE `{$NAMESPACE}_project`.`project`
ADD `editPolicy` varchar(64) COLLATE utf8_bin;
ALTER TABLE `{$NAMESPACE}_project`.`project`
ADD `joinPolicy` varchar(64) COLLATE utf8_bin;