Decode as integers

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-08-29 21:26:38 +01:00
parent 12fa505972
commit ea38d6c2f3

View file

@ -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;
}
/**