Homec4science

Make the "you can't edit away your edit capability" policy check generic

Authored by epriestley <git@epriestley.com> on Feb 10 2014, 23:31.

Description

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

Details

Committed
epriestley <git@epriestley.com>Feb 10 2014, 23:31
Pushed
aubortJan 31 2017, 17:16
Parents
rPHc3544f88623b: Move "Archive Project" to a standard, separate action
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHe4e4810b89eb: Make the "you can't edit away your edit capability" policy check generic (authored by epriestley <git@epriestley.com>).Feb 10 2014, 23:31