misc_pterodactyl-panel/app/Http/Requests/Api/Client/Servers/GetDatabasesRequest.php

21 lines
495 B
PHP
Raw Normal View History

2018-08-22 04:47:01 +00:00
<?php
namespace Pterodactyl\Http\Requests\Api\Client\Servers;
use Pterodactyl\Models\Server;
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
class GetDatabasesRequest extends ClientApiRequest
{
/**
* Determine if this user has permission to view all of the databases available
* to this server.
*
* @return bool
*/
public function authorize(): bool
{
return $this->user()->can('view-databases', $this->getModel(Server::class));
}
}