2018-01-12 04:49:46 +00:00
|
|
|
<?php
|
|
|
|
|
2018-01-20 01:58:57 +00:00
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application;
|
2018-01-12 04:49:46 +00:00
|
|
|
|
2021-08-05 04:14:14 +00:00
|
|
|
use Pterodactyl\Http\Requests\Api\ApiRequest;
|
2018-01-12 04:49:46 +00:00
|
|
|
|
2021-08-05 04:14:14 +00:00
|
|
|
abstract class ApplicationApiRequest extends ApiRequest
|
2018-01-12 04:49:46 +00:00
|
|
|
{
|
2018-03-02 02:00:14 +00:00
|
|
|
/**
|
2021-08-05 04:14:14 +00:00
|
|
|
* This will eventually be replaced with per-request permissions checking
|
|
|
|
* on the API key and for the user.
|
2018-01-12 04:49:46 +00:00
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
2021-08-05 04:14:14 +00:00
|
|
|
public function authorize(): bool
|
2018-01-12 04:49:46 +00:00
|
|
|
{
|
2021-08-05 04:14:14 +00:00
|
|
|
return $this->user()->root_admin;
|
2018-01-12 04:49:46 +00:00
|
|
|
}
|
|
|
|
}
|