From 340f8b73a57fb6a5b1924cc1264c11c9b044fc4e Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 30 Apr 2025 13:56:37 +0100 Subject: [PATCH] Updated comments Signed-off-by: snipe --- app/Models/Group.php | 2 +- app/Models/User.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Group.php b/app/Models/Group.php index d4953291d2..6dae273998 100755 --- a/app/Models/Group.php +++ b/app/Models/Group.php @@ -80,7 +80,7 @@ class Group extends SnipeModel */ 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)) { $this->permissions = json_encode($this->permissions); } diff --git a/app/Models/User.php b/app/Models/User.php index b10a948849..a115852d5c 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -755,7 +755,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo */ 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)) { $this->permissions = json_encode($this->permissions); }