feat(auth): introduce resource creation authorization middleware and policies for enhanced access control
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user