HomePhabricator

Implement query and policy rules for subprojects

Description

Implement query and policy rules for subprojects

Summary:
Ref T10010. This implements technical groundwork for subprojects. Specifically, it implements policy rules like Phriction:

  • to see a project, you must be able to see all of its parents (and the project itself).
  • you can edit a project if you can edit any of its parents (or the project itself).

To facilitiate this, we load all project ancestors when querying projects so we can do the view/edit checks.

This does NOT yet implement:

  • proper membership rules for these projects (up next);
  • any kind of UI to let users create subprojects.

Test Plan:

  • Added unit tests.
  • Executed unit tests.
  • Browsed Projects (no change in behavior is expected).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D14861

Details

Provenance
epriestleyAuthored on
epriestleyPushed on Dec 23 2015, 10:38 PM
Reviewer
chad
Differential Revision
D14861: Implement query and policy rules for subprojects
Parents
rP16d8e806a0bc: Simplify ProjectQuery handling of viewer membership
Branches
Unknown
Tags
Unknown
Tasks
T10010: Implement Subprojects
Build Status
Buildable 9757
Build 11721: Run Core Tests