Updated comments

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2025-04-30 13:56:37 +01:00
parent 6c6b37000a
commit 340f8b73a5
2 changed files with 2 additions and 2 deletions

View file

@ -80,7 +80,7 @@ class Group extends SnipeModel
*/ */
public function decodePermissions() public function decodePermissions()
{ {
// Set default to empty JSON if the value is null // If the permissions are an array, convert it to JSON
if (is_array($this->permissions)) { if (is_array($this->permissions)) {
$this->permissions = json_encode($this->permissions); $this->permissions = json_encode($this->permissions);
} }

View file

@ -755,7 +755,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
*/ */
public function decodePermissions() public function decodePermissions()
{ {
// Set default to empty JSON if the value is null // If the permissions are an array, convert it to JSON
if (is_array($this->permissions)) { if (is_array($this->permissions)) {
$this->permissions = json_encode($this->permissions); $this->permissions = json_encode($this->permissions);
} }