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
Unknown Object (File)
Fri, Dec 6, 10:29 AM
Unknown Object (File)
Fri, Nov 29, 10:53 AM
Unknown Object (File)
Tue, Nov 26, 3:54 PM
Unknown Object (File)
Tue, Nov 26, 3:54 PM
Unknown Object (File)
Tue, Nov 26, 8:05 AM
Unknown Object (File)
Nov 20 2024, 10:38 PM
Unknown Object (File)
Nov 20 2024, 3:26 PM
Unknown Object (File)
Nov 16 2024, 1:58 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