Page MenuHomePhabricator

Remove Join Policy from Phame
ClosedPublic

Authored by chad on Nov 9 2015, 4:16 AM.
Tags
None
Referenced Files
F14054628: D14444.diff
Sat, Nov 16, 3:33 AM
F14043634: D14444.diff
Tue, Nov 12, 11:50 AM
F14029310: D14444.id34914.diff
Fri, Nov 8, 8:25 PM
F14029309: D14444.id34910.diff
Fri, Nov 8, 8:25 PM
F14029308: D14444.id.diff
Fri, Nov 8, 8:25 PM
F14029307: D14444.diff
Fri, Nov 8, 8:25 PM
F14025663: D14444.diff
Thu, Nov 7, 7:29 PM
F13991091: D14444.diff
Tue, Oct 22, 8:43 AM
Subscribers

Details

Summary

Drops Join Policy, uses Edit Policy where needed. Allows anyone with Blog Edit permissions to post and edit any post on that blog. Fixes T5371

Test Plan

Draft Post as chad, see post, log in with notchad, edit that post and publish it.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

chad retitled this revision from to Remove Join Policy from Phame.
chad updated this object.
chad edited the test plan for this revision. (Show Details)
chad added a reviewer: epriestley.
epriestley edited edge metadata.

Cool, I think this is a good simplification. It's also easy for us to add a separate policy back later if we need it, but harder to remove this policy once we unprototype.

src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php
75–78

You should also require CAN_VIEW here.

src/applications/phame/storage/PhamePost.php
197–212

At some point in the future we should make sure getBlog() always exists (I think this is an artifact of an earlier time when a post could belong to multiple blogs) and clean this up, but it's fine for now.

This revision is now accepted and ready to land.Nov 9 2015, 3:12 PM
This revision was automatically updated to reflect the committed changes.
chad marked 2 inline comments as done.