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
F13221175: D8179.diff
Sun, May 19, 2:19 AM
F13206290: D8179.id18520.diff
Wed, May 15, 6:50 AM
F13203026: D8179.diff
Tue, May 14, 11:25 PM
F13194034: D8179.diff
Sun, May 12, 9:09 PM
F13188863: D8179.diff
Sat, May 11, 5:33 AM
F13183607: D8179.id18520.diff
Fri, May 10, 10:34 AM
F13183606: D8179.id18502.diff
Fri, May 10, 10:34 AM
F13183278: D8179.id.diff
Fri, May 10, 8:05 AM
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