mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Decode as integers
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
12fa505972
commit
ea38d6c2f3
|
@ -703,7 +703,11 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
|||
|
||||
public function decodePermissions()
|
||||
{
|
||||
return json_decode($this->permissions, true);
|
||||
$permissions = json_decode($this->permissions, JSON_OBJECT_AS_ARRAY|JSON_BIGINT_AS_STRING);
|
||||
foreach ($permissions as $permission => $value) {
|
||||
$permissions[$permission] = (int) $value;
|
||||
}
|
||||
return $permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue