1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications/policy
epriestley e4e4810b89 Make the "you can't edit away your edit capability" policy check generic
Summary:
Ref T4379. Currently, you can edit away your edit capability in Projects. Prevent this in a general way.

Since some objects have complex edit policies (like "the owner can always edit"), we can't just check the value itself. We also can't fairly assume that every object has a `setEditPolicy()` method, even though almost all do right now. Instead, provide a way to pretend we've completed the edit and changed the policy.

Test Plan: Unit tests, tried to edit away my edit capability.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4379

Differential Revision: https://secure.phabricator.com/D8179
2014-02-10 14:31:16 -08:00
..
__tests__ Fix an error in the PolicyFilter algorithm 2013-12-05 17:00:53 -08:00
application Prepare the policy rule edit endpoint for integration 2013-10-14 12:07:31 -07:00
capability Allow "Default View" policies to be set to Public 2013-10-09 15:06:18 -07:00
config Move policy config to "Policy" app and make policy.allow-public description scarier 2013-09-27 10:50:19 -07:00
constants Passphrase v0 2013-11-20 09:13:35 -08:00
controller Harbormaster v(-2) 2013-10-22 15:01:06 -07:00
exception Allow applications to define new policy capabilities 2013-10-07 13:28:58 -07:00
filter Make the "you can't edit away your edit capability" policy check generic 2014-02-10 14:31:16 -08:00
interface Work around a bug in PHP 5.3-ish with abstract methods in interfaces 2013-10-25 15:58:17 -07:00
management Extend all "ManagementWorkflow" classes from a base class 2013-12-27 13:15:40 -08:00
phid Remove many redundant implementations of canLoadNamedObject() 2013-12-18 12:00:01 -08:00
query Always include the current user as a selectable policy 2013-12-30 16:48:36 -08:00
rule Legalpad - add policy rule for legalpad document signatures 2014-01-15 16:48:44 -08:00
storage Passphrase v0 2013-11-20 09:13:35 -08:00