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)
Sat, Mar 16, 7:43 AM
Unknown Object (File)
Tue, Mar 5, 11:41 AM
Unknown Object (File)
Tue, Mar 5, 11:41 AM
Unknown Object (File)
Tue, Mar 5, 11:41 AM
Unknown Object (File)
Tue, Mar 5, 11:41 AM
Unknown Object (File)
Fri, Mar 1, 12:31 AM
Unknown Object (File)
Feb 21 2024, 6:42 AM
Unknown Object (File)
Feb 11 2024, 10:21 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.