Page MenuHomePhabricator

Move the "Can Lock Projects" check from requireCapabilities() to transaction validation
ClosedPublic

Authored by epriestley on Aug 14 2018, 9:49 PM.
Tags
None
Referenced Files
F14320724: D19585.diff
Wed, Dec 18, 11:09 AM
F14301806: D19585.id46816.diff
Tue, Dec 17, 6:25 PM
Unknown Object (File)
Thu, Dec 12, 7:57 AM
Unknown Object (File)
Sun, Dec 8, 6:10 AM
Unknown Object (File)
Wed, Dec 4, 1:49 PM
Unknown Object (File)
Fri, Nov 29, 8:54 PM
Unknown Object (File)
Wed, Nov 20, 8:51 AM
Unknown Object (File)
Nov 16 2024, 7:44 AM
Subscribers
None

Details

Summary

Depends on D19584. Ref T13164. This check is an extra check: you need EDIT and this capability. Thus, we can do it in validation without issues.

Test Plan
  • This code isn't reachable today: all methods of applying this transaction do a separate check for "Can Lock" upfront.
  • Commented out the "Can Lock" check in the LockController, tried to lock as a user without permission. Was rejected with a policy exception.

Diff Detail

Repository
rP Phabricator
Branch
uxaction7
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20616
Build 28014: Run Core Tests
Build 28013: arc lint + arc unit