Add support for user management of databases
This commit is contained in:
parent
aaccf38640
commit
bcb69603ad
9 changed files with 132 additions and 7 deletions
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Requests\Server\Database;
|
||||
|
||||
use Pterodactyl\Http\Requests\Server\ServerFormRequest;
|
||||
|
||||
class DeleteServerDatabaseRequest extends ServerFormRequest
|
||||
{
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
if (! parent::authorize()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return config('pterodactyl.client_features.databases.enabled');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the user permission to validate this request aganist.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function permission(): string
|
||||
{
|
||||
return 'delete-database';
|
||||
}
|
||||
|
||||
/**
|
||||
* Rules to validate this request aganist.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue