mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-01 11:55:51 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
33 lines
841 B
PHP
33 lines
841 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Files;
|
|
|
|
use Pterodactyl\Contracts\Http\ClientPermissionsRequest;
|
|
use Pterodactyl\Enum\Permissions;
|
|
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
|
|
|
|
class GetFileContentsRequest extends ClientApiRequest implements ClientPermissionsRequest
|
|
{
|
|
/**
|
|
* Returns the permissions string indicating which permission should be used to
|
|
* validate that the authenticated user has permission to perform this action aganist
|
|
* the given resource (server).
|
|
*/
|
|
public function permission(): string
|
|
{
|
|
return Permissions::FileReadContent->value;
|
|
}
|
|
|
|
/**
|
|
* @return ValidationRules
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'file' => ['required', 'string'],
|
|
];
|
|
}
|
|
}
|