Update existing application API to use simplified user permission checking
This commit is contained in:
parent
622d292f39
commit
47b895a98a
57 changed files with 109 additions and 532 deletions
|
@ -3,11 +3,17 @@
|
|||
namespace Pterodactyl\Http\Requests\Api\Client;
|
||||
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Contracts\Http\ClientPermissionsRequest;
|
||||
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
||||
use Pterodactyl\Http\Requests\Api\ApiRequest;
|
||||
|
||||
abstract class ClientApiRequest extends ApplicationApiRequest implements ClientPermissionsRequest
|
||||
abstract class ClientApiRequest extends ApiRequest
|
||||
{
|
||||
/**
|
||||
* Returns the permissions string indicating which permission should be used to
|
||||
* validate that the authenticated user has permission to perform this action aganist
|
||||
* the given resource (server).
|
||||
*/
|
||||
abstract public function permission(): string;
|
||||
|
||||
/**
|
||||
* Determine if the current user is authorized to perform the requested action
|
||||
* against the API.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue