Page MenuHomePhabricator

Phriction - policy front end changes
ClosedPublic

Authored by btrahan on Nov 7 2014, 10:15 PM.

Details

Summary

Ref T4029. Fixes T6034.

Various front-end miscellania here. See D10814#96251. This more or less makes policy work but I am not going to call it "fixed" here since we need D10814 to be deployed too and will do that manually.

Test Plan
  • changed document policy from web ui and changes persisted
  • changed document policy from web and had form error and changes persisted
  • created a structure like users/users/justmyuserpolicy and made sure another user could delete the users/users/ doc
  • moved a doc from a to b and verified policy persisted
  • verified stub documents inherited policy of the document that stub them...!
  • uploaded a file and verified that it 1) had the permissions of the page it was added to and 2) had an "attached" tab linking back to the page on the file page (this means T6034 is fixed with this)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Phriction - policy front end changes.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.

I'd say the next bit is probably more project cleanup. I think the "phrictionSlug" concept can be removed entirely now. Should I pursue that or is that some debt to tackle later given the policy bit should be done-ish now and there is no user-visible project crud?

src/applications/phriction/storage/PhrictionDocument.php
21

i could not find any such call sites...

btrahan edited the test plan for this revision. (Show Details)
btrahan edited the test plan for this revision. (Show Details)
epriestley edited edge metadata.

Should I pursue that or is that some debt to tackle later given the policy bit should be done-ish now and there is no user-visible project crud?

I think we can safely leave it for later, AFAIK this clears all the relevant user-facing stuff and I don't think it has any technical impact either.

src/applications/phriction/controller/PhrictionDocumentController.php
8–10

(Do we need this on any of the list / history sorts of controllers?)

src/applications/phriction/controller/PhrictionEditController.php
250

Maybe $edit_capability for consistency.

src/applications/phriction/storage/PhrictionDocument.php
21

Good call, pretty sure these got cleaned up.

This revision is now accepted and ready to land.Nov 7 2014, 11:08 PM
btrahan edited edge metadata.
  • use edit_capability
  • sprinkle some allowPublic love including on the diff controller (note the list already had it)
This revision was automatically updated to reflect the committed changes.