mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
If permissions are blank, don't error out on json_decode
This commit is contained in:
parent
8f1c4138d1
commit
0568e979e8
|
@ -45,6 +45,10 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||||
if ($this->isSuperUser()) {
|
if ($this->isSuperUser()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->permissions=='') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$user_permissions = json_decode($this->permissions, true);
|
$user_permissions = json_decode($this->permissions, true);
|
||||||
$user_groups = $this->groups();
|
$user_groups = $this->groups();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue