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
F13289116: D15268.diff
Tue, Jun 4, 11:27 AM
F13272241: D15268.diff
Thu, May 30, 10:54 AM
F13242311: D15268.id36840.diff
Thu, May 23, 2:18 AM
F13235883: D15268.diff
Tue, May 21, 7:00 AM
F13227370: D15268.id36841.diff
Mon, May 20, 2:56 AM
F13220915: D15268.diff
Sun, May 19, 2:05 AM
F13203778: D15268.diff
Wed, May 15, 12:06 AM
F13199285: D15268.id.diff
Mon, May 13, 1:27 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.