2019-03-24 00:47:20 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Network;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Server;
|
|
|
|
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
|
|
|
|
|
|
|
|
class GetNetworkRequest extends ClientApiRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Check that the user has permission to view the allocations for
|
|
|
|
* this server.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function authorize(): bool
|
|
|
|
{
|
2019-11-04 01:13:47 +00:00
|
|
|
return $this->user()->can('allocation.read', $this->getModel(Server::class));
|
2019-03-24 00:47:20 +00:00
|
|
|
}
|
|
|
|
}
|