Fix more permissions checking
This commit is contained in:
parent
b996316d92
commit
b41e7ecf09
3 changed files with 15 additions and 6 deletions
|
@ -221,4 +221,13 @@ class ServerPolicy
|
|||
return $user->permissions()->server($server)->permission('view-manage')->exists();
|
||||
}
|
||||
|
||||
public function viewAllocation(User $user, Server $server)
|
||||
{
|
||||
if ($this->isOwner($user, $server)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $user->permissions()->server($server)->permission('view-allocation')->exists();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue