2019-03-17 00:10:04 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Files;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Server;
|
|
|
|
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
|
|
|
|
|
|
|
|
class DownloadFileRequest extends ClientApiRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Ensure that the user making this request has permission to download files
|
|
|
|
* from this server.
|
|
|
|
*/
|
|
|
|
public function authorize(): bool
|
|
|
|
{
|
2022-05-22 18:10:01 +00:00
|
|
|
return $this->user()->can('file.read', $this->parameter('server', Server::class));
|
2019-03-17 00:10:04 +00:00
|
|
|
}
|
|
|
|
}
|