mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 08:44:46 +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();
|
$subuser = $server->subusers->where('user_id', $user->id)->first();
|
||||||
// If the user is a subuser check their permissions
|
// If the user is a subuser check their permissions
|
||||||
if ($subuser) {
|
if ($subuser && in_array($ability, $subuser->permissions)) {
|
||||||
return in_array($ability, $subuser->permissions);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return null to let default policies take over
|
// Return null to let default policies take over
|
||||||
|
Loading…
x
Reference in New Issue
Block a user