feat(auth): enable event-scoped admin access and backfill staff assignments

This commit is contained in:
2026-09-30 15:31:53 -03:00
parent 44bf67bd12
commit a770d435eb
5 changed files with 77 additions and 7 deletions

View File

@@ -25,8 +25,8 @@ class EnsureAdminAppTenant
|| $user->rol_codigo !== RoleCode::AdminApp->value
|| ! $user->tenant_codigo
|| ! $this->accessService->hasValidScope($user)
// Tenant operations remain unavailable until they implement event authorization.
|| ($access !== 'context' && ! $user->isTenantAdministrator())
// Only routes implementing event authorization may accept event administrators.
|| (! in_array($access, ['context', 'event'], true) && ! $user->isTenantAdministrator())
) {
throw new AuthorizationException;
}