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
Unknown Object (File)
Wed, Jun 4, 8:58 AM
Unknown Object (File)
Tue, Jun 3, 9:22 PM
Unknown Object (File)
Tue, Jun 3, 5:22 AM
Unknown Object (File)
Tue, Jun 3, 5:22 AM
Unknown Object (File)
Wed, May 28, 11:02 AM
Unknown Object (File)
Tue, May 27, 8:25 AM
Unknown Object (File)
Sat, May 24, 4:16 PM
Unknown Object (File)
Apr 29 2025, 3:51 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable