commit compras4 2711
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-27 19:13:31 +02:00
parent 9cf9764710
commit 7486007fcf
41 changed files with 1270 additions and 66 deletions
+5
View File
@@ -13,6 +13,11 @@ class CurrentActor
*/
public function lock(User $actor, ?array $roles = null): User
{
if (app(RequisitionExpiryRun::class)->tenantId() !== null) {
abort_unless($roles === null, 403);
return app(RequisitionExpiryRun::class)->lock($actor);
}
abort_unless(auth()->id() === $actor->id && $actor->tenant_id !== null, 403);
if (DB::connection()->transactionLevel() === 0) {
throw new \LogicException('Revalidar o operador dentro da transacção.');