Add basic database listing for server
This commit is contained in:
parent
04f56ffe99
commit
17796fb1c4
13 changed files with 255 additions and 23 deletions
20
app/Http/Requests/Api/Client/Servers/GetDatabasesRequest.php
Normal file
20
app/Http/Requests/Api/Client/Servers/GetDatabasesRequest.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?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));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue