mirror of
https://github.com/snipe/snipe-it.git
synced 2026-05-03 05:06:57 +00:00
If permissions are blank, don't error out on json_decode
This commit is contained in:
@ -45,6 +45,10 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||
if ($this->isSuperUser()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->permissions=='') {
|
||||
return false;
|
||||
}
|
||||
$user_permissions = json_decode($this->permissions, true);
|
||||
$user_groups = $this->groups();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user