mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 20:15:36 +00:00
feat: introduce root permission
This commit is contained in:
1 parent
5bbcd7bf76
commit
ff74fb7385
5 files changed
+30
-13
No files matched your search
@@ -9,6 +9,10 @@ class ApiAbility extends CheckForAnyAbility
|
||||
public function handle($request, $next, ...$abilities)
|
||||
{
|
||||
try {
|
||||
if ($request->user()->tokenCan('root')) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
return parent::handle($request, $next, ...$abilities);
|
||||
} catch (\Illuminate\Auth\AuthenticationException $e) {
|
||||
return response()->json([
|
||||
|
||||
Reference in new issue
Block a user