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
F18420193: D19584.diff
Sat, Aug 30, 4:01 PM
F18375496: D19584.diff
Thu, Aug 28, 10:04 AM
F17948387: D19584.id.diff
Jul 31 2025, 8:57 PM
F17929463: D19584.diff
Jul 30 2025, 5:10 PM
F17762868: D19584.id46838.diff
Jul 22 2025, 10:40 PM
F17754959: D19584.id46815.diff
Jul 22 2025, 11:39 AM
F17739691: D19584.diff
Jul 21 2025, 3:25 AM
Unknown Object (File)
Jul 5 2025, 7:37 AM
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
Branch
uxaction6
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20615
Build 28012: Run Core Tests
Build 28011: arc lint + arc unit