Page MenuHomePhabricator

Use an extended policy to bind column and board policies together
ClosedPublic

Authored by epriestley on Feb 13 2016, 6:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 12:04 AM
Unknown Object (File)
Fri, Apr 19, 2:25 AM
Unknown Object (File)
Fri, Apr 19, 2:25 AM
Unknown Object (File)
Fri, Apr 19, 2:25 AM
Unknown Object (File)
Tue, Apr 16, 4:26 AM
Unknown Object (File)
Thu, Apr 11, 7:47 PM
Unknown Object (File)
Thu, Apr 11, 8:21 AM
Unknown Object (File)
Thu, Apr 11, 3:45 AM
Subscribers
None

Details

Summary

Ref T10349. Columns have the same policies as the projects they belong to.

However, the current implementation just returns the policy directly. This usually works, but if the project has a policy like "Members of (This) Project", the policy filter tries to check if the viewer is a member of the column itself. That doesn't work, since columns don't have members. This leads to a situation where columns on "Editable By: Project Members" projects can not be edited.

Instead, return a permissive base policy and then use an extended policy to bind the column policy to the project policy.

Test Plan
  • Edited a column on an "Editable By: Members of Project" board.
  • Added and ran a unit test covering this case.

Diff Detail

Repository
rP Phabricator
Branch
extpolicy
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 10684
Build 13125: Run Core Tests
Build 13124: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Use an extended policy to bind column and board policies together.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
src/applications/project/controller/PhabricatorProjectColumnDetailController.php
77

I removed this from the UI since it's now misleading and does not seem useful anyway.

chad edited edge metadata.
This revision is now accepted and ready to land.Feb 13 2016, 6:17 PM
This revision was automatically updated to reflect the committed changes.