misc_pterodactyl-panel/app/Http/Requests/Api/Client/Servers/Files/DownloadFileRequest.php
Matthew Penner 3670dc6d4b
phpstan
2022-12-14 18:08:50 -07:00

18 lines
473 B
PHP

<?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
{
return $this->user()->can('file.read', $this->route()->parameter('server'));
}
}