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
F17873561: D8179.id18520.diff
Mon, Jul 28, 5:22 PM
F17826552: D8179.id.diff
Sat, Jul 26, 7:23 AM
F17809339: D8179.diff
Fri, Jul 25, 4:46 PM
F17758729: D8179.diff
Tue, Jul 22, 5:37 PM
Unknown Object (File)
Jul 5 2025, 11:20 AM
Unknown Object (File)
Jun 17 2025, 6:54 AM
Unknown Object (File)
Jun 17 2025, 4:26 AM
Unknown Object (File)
Jun 16 2025, 8: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