mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-27 18:43:45 +02:00
api(application): fix api key permissions
This commit is contained in:
@@ -84,7 +84,7 @@ abstract class BaseTransformer extends TransformerAbstract
|
|||||||
*/
|
*/
|
||||||
protected function authorize(string $resource): bool
|
protected function authorize(string $resource): bool
|
||||||
{
|
{
|
||||||
if ($this->isRootAdmin()) {
|
if ($this->getKey()->key_type === ApiKey::TYPE_ACCOUNT && $this->isRootAdmin()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class LocationTransformer extends BaseTransformer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the nodes associated with this location.
|
* Return the servers associated with this location.
|
||||||
*
|
*
|
||||||
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
|
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
|
||||||
*
|
*
|
||||||
@@ -62,7 +62,6 @@ class LocationTransformer extends BaseTransformer
|
|||||||
*
|
*
|
||||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||||
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
|
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public function includeNodes(Location $location)
|
public function includeNodes(Location $location)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user