Initial attempt trying to get file downloading to work

This commit is contained in:
Dane Everitt 2019-03-16 17:10:04 -07:00
parent 4e669771ca
commit 8955b5a660
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 153 additions and 3 deletions

View file

@ -0,0 +1,20 @@
<?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.
*
* @return bool
*/
public function authorize(): bool
{
return $this->user()->can('download-files', $this->getModel(Server::class));
}
}