diff --git a/app/Policies/ServerPolicy.php b/app/Policies/ServerPolicy.php index 1922ce56e..0bb59caa5 100644 --- a/app/Policies/ServerPolicy.php +++ b/app/Policies/ServerPolicy.php @@ -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(); + } + } diff --git a/resources/views/layouts/master.blade.php b/resources/views/layouts/master.blade.php index b5cfa3e6f..b71bd10c0 100644 --- a/resources/views/layouts/master.blade.php +++ b/resources/views/layouts/master.blade.php @@ -193,9 +193,9 @@