mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 02:54:45 +02:00
Fix permission check if user is subuser and admin (#720)
This commit is contained in:
parent
54039e25a4
commit
90afae79db
@ -28,8 +28,8 @@ class ServerPolicy
|
||||
|
||||
$subuser = $server->subusers->where('user_id', $user->id)->first();
|
||||
// If the user is a subuser check their permissions
|
||||
if ($subuser) {
|
||||
return in_array($ability, $subuser->permissions);
|
||||
if ($subuser && in_array($ability, $subuser->permissions)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Return null to let default policies take over
|
||||
|
Loading…
x
Reference in New Issue
Block a user