Page MenuHomePhabricator

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

Authored by epriestley on Feb 10 2014, 7:36 PM.
Tags
None
Referenced Files
F14054479: D8179.diff
Sat, Nov 16, 1:58 AM
F14042043: D8179.diff
Mon, Nov 11, 11:53 PM
F14035027: D8179.id18502.diff
Sun, Nov 10, 3:34 AM
F14027231: D8179.diff
Fri, Nov 8, 6:00 AM
F14023051: D8179.id18520.diff
Wed, Nov 6, 10:07 PM
F13972875: D8179.diff
Oct 17 2024, 9:39 PM
F13972868: D8179.id.diff
Oct 17 2024, 9:37 PM
F13972865: D8179.id18502.diff
Oct 17 2024, 9:36 PM
Subscribers

Details

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.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped