Page MenuHomePhabricator

Implement query and policy rules for subprojects
ClosedPublic

Authored by epriestley on Dec 23 2015, 2:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 2:58 AM
Unknown Object (File)
Fri, Apr 19, 3:58 PM
Unknown Object (File)
Fri, Apr 12, 8:12 AM
Unknown Object (File)
Thu, Apr 11, 3:22 PM
Unknown Object (File)
Wed, Apr 10, 7:55 PM
Unknown Object (File)
Mon, Apr 8, 10:19 PM
Unknown Object (File)
Sun, Apr 7, 11:18 AM
Unknown Object (File)
Mon, Apr 1, 12:25 AM
Subscribers
None
Tokens
"Yellow Medal" token, awarded by Luke081515.2.

Details

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).

Diff Detail

Repository
rP Phabricator
Branch
proj2
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/applications/project/storage/PhabricatorProject.php:134XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 9747
Build 11704: Run Core Tests
Build 11703: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Implement query and policy rules for subprojects.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 23 2015, 4:41 PM
This revision was automatically updated to reflect the committed changes.