fix null admin role breaking user transformer
This commit is contained in:
parent
a92f3648b2
commit
004a13a5f7
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue