2017-10-28 02:42:53 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Server\Subuser;
|
|
|
|
|
|
|
|
use Pterodactyl\Http\Requests\Server\ServerFormRequest;
|
|
|
|
|
|
|
|
class SubuserStoreFormRequest extends ServerFormRequest
|
|
|
|
{
|
|
|
|
/**
|
2018-05-13 14:50:56 +00:00
|
|
|
* Return the user permission to validate this request against.
|
2017-10-28 02:42:53 +00:00
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
protected function permission(): string
|
|
|
|
{
|
|
|
|
return 'create-subuser';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-05-13 14:50:56 +00:00
|
|
|
* The rules to validate this request submission against.
|
2017-10-28 02:42:53 +00:00
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'email' => 'required|email',
|
2018-07-01 01:25:46 +00:00
|
|
|
'permissions' => 'sometimes|array',
|
2017-10-28 02:42:53 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|