fix null admin role breaking user transformer

This commit is contained in:
Matthew Penner 2021-09-13 00:58:39 -06:00
parent a92f3648b2
commit 004a13a5f7
No known key found for this signature in database
GPG Key ID: 030E4AB751DC756F
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class UserTransformer extends Transformer
*/ */
public function includeRole(User $user) public function includeRole(User $user)
{ {
if (!$this->authorize(AdminAcl::RESOURCE_ROLES)) { if (!$this->authorize(AdminAcl::RESOURCE_ROLES) || is_null($user->adminRole)) {
return $this->null(); return $this->null();
} }