2018-03-10 20:44:21 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Server\Settings;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Server;
|
|
|
|
use Pterodactyl\Http\Requests\Server\ServerFormRequest;
|
|
|
|
|
|
|
|
class ChangeServerNameRequest extends ServerFormRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Permission to use when checking if a user can access this resource.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
protected function permission(): string
|
|
|
|
{
|
|
|
|
return 'edit-name';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Rules to use when validating the submitted data.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
return [
|
2019-09-05 05:26:28 +00:00
|
|
|
'name' => Server::getRules()['name'],
|
2018-03-10 20:44:21 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|