mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 21:46:51 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			495 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			495 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.
 | |
|      *
 | |
|      * @return bool
 | |
|      */
 | |
|     public function authorize(): bool
 | |
|     {
 | |
|         return $this->user()->can('file.read', $this->getModel(Server::class));
 | |
|     }
 | |
| }
 | 
