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

View file

@ -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();
}