20 lines
467 B
PHP
20 lines
467 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Databases;
|
|
|
|
use Pterodactyl\Models\Server;
|
|
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
|
|
|
|
class RotatePasswordRequest extends ClientApiRequest
|
|
{
|
|
/**
|
|
* Check that the user has permission to rotate the password.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return $this->user()->can('database.update', $this->getModel(Server::class));
|
|
}
|
|
}
|