mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-20 07:13:45 +02:00
Add proper permissions for role application routes, allow admins to access application api
This commit is contained in:
@@ -50,6 +50,10 @@ abstract class ApplicationApiRequest extends FormRequest
|
||||
throw new PterodactylException('An ACL resource must be defined on API requests.');
|
||||
}
|
||||
|
||||
if (! is_null($this->user())) {
|
||||
return $this->user()->root_admin;
|
||||
}
|
||||
|
||||
return AdminAcl::check($this->key(), $this->resource, $this->permission);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user