fix null admin role breaking user transformer
This commit is contained in:
parent
a92f3648b2
commit
004a13a5f7
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue