mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
support for changing allocation on frontend
This commit is contained in:
@@ -175,4 +175,20 @@ class ServerPolicy
|
||||
return $user->permissions()->server($server)->permission('download-files')->exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if user has permission to change the default connection information.
|
||||
*
|
||||
* @param Pterodactyl\Models\User $user
|
||||
* @param Pterodactyl\Models\Server $server
|
||||
* @return boolean
|
||||
*/
|
||||
public function setConnection(User $user, Server $server)
|
||||
{
|
||||
if ($this->isOwner($user, $server)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $user->permissions()->server($server)->permission('set-connection')->exists();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user