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:
parent
758927db8e
commit
88378ce983
8 changed files with 185 additions and 46 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue