mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 23:03:45 +02:00
Add allocations tab
Strips some core allocation features for now, will be added back with more features once the theme is done.
This commit is contained in:
@@ -498,6 +498,30 @@ class ServerPolicy
|
||||
return $this->checkPermission($user, $server, 'create-task');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if user has permission to view server allocations.
|
||||
*
|
||||
* @param \Pterodactyl\Models\User $user
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return bool
|
||||
*/
|
||||
public function viewAllocation(User $user, Server $server)
|
||||
{
|
||||
return $this->checkPermission($user, $server, 'view-allocation');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if user has permission to set the default allocation.
|
||||
*
|
||||
* @param \Pterodactyl\Models\User $user
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return bool
|
||||
*/
|
||||
public function setAllocation(User $user, Server $server)
|
||||
{
|
||||
return $this->checkPermission($user, $server, 'set-allocation');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the user has the given permission on/for the server.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user