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)
Fri, Jan 17, 10:13 PM
Unknown Object (File)
Fri, Jan 17, 4:49 AM
Unknown Object (File)
Tue, Jan 14, 6:36 PM
Unknown Object (File)
Sat, Jan 4, 5:56 PM
Unknown Object (File)
Fri, Jan 3, 7:47 PM
Unknown Object (File)
Wed, Jan 1, 7:01 AM
Unknown Object (File)
Sun, Dec 22, 2:25 AM
Unknown Object (File)
Dec 19 2024, 9:18 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