Page MenuHomePhabricator

Move the hierarchical edit policy check in Phriction from requireCapabilities() to validateTransactions()
ClosedPublic

Authored by epriestley on Aug 14 2018, 9:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 2:54 AM
Unknown Object (File)
Thu, Apr 11, 10:22 AM
Unknown Object (File)
Wed, Apr 10, 8:43 PM
Unknown Object (File)
Fri, Apr 5, 9:19 PM
Unknown Object (File)
Mar 10 2024, 10:40 AM
Unknown Object (File)
Feb 22 2024, 3:12 AM
Unknown Object (File)
Feb 17 2024, 4:36 PM
Unknown Object (File)
Feb 15 2024, 3:52 PM
Subscribers
None

Details

Summary

Depends on D19583. Ref T13164. This continues the work of getting rid of requireCapabilities().

This check is valid, but can be a validateTransactions() check instead. This is generally more consistent with how other applications work (e.g., creating subprojects).

The UI for this isn't terribly great: you get a policy error after you try to create the object. But that's how it worked before, so this isn't any worse than it was. The actual policy exception is (very) slightly more clear now (raised against the right object).

Test Plan
  • Created a child as a user with permission to do so to make sure I didn't break that.
  • Set edit permission on a/ to just me, tried to create a/b/ as another user, got a policy exception since they can't edit the parent.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable