diff --git a/app/Transformers/Api/Application/UserTransformer.php b/app/Transformers/Api/Application/UserTransformer.php index d0439e654..dcf3db55d 100644 --- a/app/Transformers/Api/Application/UserTransformer.php +++ b/app/Transformers/Api/Application/UserTransformer.php @@ -46,7 +46,7 @@ class UserTransformer extends Transformer */ public function includeRole(User $user) { - if (!$this->authorize(AdminAcl::RESOURCE_ROLES)) { + if (!$this->authorize(AdminAcl::RESOURCE_ROLES) || is_null($user->adminRole)) { return $this->null(); }