feat(auth): introduce resource creation authorization middleware and policies for enhanced access control

This commit is contained in:
Andras Bacsai committed 2025-08-26 10:27:38 +02:00
1 parent 0702d29ae1
commit 3e1f47a243
9 files changed
+256 -4

No files matched your search

+8
View File
@@ -99,4 +99,12 @@ class ApplicationPolicy
{
return $user->isAdmin() && $user->teams()->get()->firstWhere('id', $application->team()->first()->id) !== null;
}
/**
* Determine whether the user can cleanup deployment queue.
*/
public function cleanupDeploymentQueue(User $user): bool
{
return $user->isAdmin();
}
}