Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Http/Requests/Api/Client/Servers/Files/DecompressFilesRequest.php
10280 views
1
<?php
2
3
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Files;
4
5
use Pterodactyl\Models\Permission;
6
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
7
8
class DecompressFilesRequest extends ClientApiRequest
9
{
10
/**
11
* Checks that the authenticated user is allowed to create new files for the server. We don't
12
* rely on the archive permission here as it makes more sense to make sure the user can create
13
* additional files rather than make an archive.
14
*/
15
public function permission(): string
16
{
17
return Permission::ACTION_FILE_CREATE;
18
}
19
20
public function rules(): array
21
{
22
return [
23
'root' => 'sometimes|nullable|string',
24
'file' => 'required|string',
25
];
26
}
27
}
28
29