diff --git a/app/Transformers/Api/Application/BaseTransformer.php b/app/Transformers/Api/Application/BaseTransformer.php index 5bb664d2b..3fd237d1a 100644 --- a/app/Transformers/Api/Application/BaseTransformer.php +++ b/app/Transformers/Api/Application/BaseTransformer.php @@ -84,7 +84,7 @@ abstract class BaseTransformer extends TransformerAbstract */ protected function authorize(string $resource): bool { - if ($this->isRootAdmin()) { + if ($this->getKey()->key_type === ApiKey::TYPE_ACCOUNT && $this->isRootAdmin()) { return true; } diff --git a/app/Transformers/Api/Application/LocationTransformer.php b/app/Transformers/Api/Application/LocationTransformer.php index 271942b49..eceb0e9e7 100644 --- a/app/Transformers/Api/Application/LocationTransformer.php +++ b/app/Transformers/Api/Application/LocationTransformer.php @@ -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 * @@ -62,7 +62,6 @@ class LocationTransformer extends BaseTransformer * * @throws \Illuminate\Contracts\Container\BindingResolutionException * @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException - */ public function includeNodes(Location $location) {