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:
Dane Everitt 2017-01-18 20:45:10 -05:00
parent 758927db8e
commit 88378ce983
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 185 additions and 46 deletions

View file

@ -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.
*