2019-07-27 23:17:50 +01:00
|
|
|
<?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
|
|
|
|
{
|
2019-11-04 01:13:47 +00:00
|
|
|
return $this->user()->can('database.update', $this->getModel(Server::class));
|
2019-07-27 23:17:50 +01:00
|
|
|
}
|
|
|
|
}
|