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)
Thu, Apr 11, 10:06 AM
Unknown Object (File)
Thu, Apr 4, 11:18 AM
Unknown Object (File)
Mar 20 2024, 12:50 AM
Unknown Object (File)
Mar 20 2024, 12:50 AM
Unknown Object (File)
Mar 20 2024, 12:04 AM
Unknown Object (File)
Mar 19 2024, 11:39 PM
Unknown Object (File)
Mar 10 2024, 8:38 PM
Unknown Object (File)
Feb 24 2024, 2:26 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