If permissions are blank, don't error out on json_decode

This commit is contained in:
snipe 2016-05-18 14:38:17 -07:00
parent 8f1c4138d1
commit 0568e979e8

View file

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