From 14545130c663c6e54d5f0fcc0dc33b01a5e36b15 Mon Sep 17 00:00:00 2001 From: yogeshwar <yogeshwar.g@vtigersolutions.com> Date: Fri, 31 May 2024 17:23:47 +0530 Subject: [PATCH] E-All Settings Roles --- modules/Settings/Profiles/models/Record.php | 3 ++- modules/Settings/Roles/models/Record.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/Settings/Profiles/models/Record.php b/modules/Settings/Profiles/models/Record.php index 9ddda530e..86d13394d 100644 --- a/modules/Settings/Profiles/models/Record.php +++ b/modules/Settings/Profiles/models/Record.php @@ -455,6 +455,7 @@ class Settings_Profiles_Record_Model extends Settings_Vtiger_Record_Model { $actionModels = Vtiger_Action_Model::getAll(true); foreach($allModuleModules as $tabId => $moduleModel) { if($moduleModel->isActive()) { + $profilePermissions[$moduleModel->getId()] = isset($profilePermissions[$moduleModel->getId()]) ? $profilePermissions[$moduleModel->getId()] : ''; $this->saveModulePermissions($moduleModel, $profilePermissions[$moduleModel->getId()]); } else { $permissions = array(); @@ -614,7 +615,7 @@ class Settings_Profiles_Record_Model extends Settings_Vtiger_Record_Model { // Enable module permission in profile2tab table only if either its an extension module or the entity module has atleast 1 action enabled if($actionEnabled) { - $isModulePermitted = isset($permissions['is_permitted']) ? $this->tranformInputPermissionValue($permissions['is_permitted']) :null; + $isModulePermitted = isset($permissions['is_permitted']) ? $this->tranformInputPermissionValue($permissions['is_permitted']) :''; } else { $isModulePermitted = Settings_Profiles_Module_Model::NOT_PERMITTED_VALUE; } diff --git a/modules/Settings/Roles/models/Record.php b/modules/Settings/Roles/models/Record.php index 213b45f99..1ad36793a 100644 --- a/modules/Settings/Roles/models/Record.php +++ b/modules/Settings/Roles/models/Record.php @@ -62,7 +62,7 @@ class Settings_Roles_Record_Model extends Settings_Vtiger_Record_Model { * @return <Settings_Roles_Record_Model> instance */ public function getParent() { - if(!$this->parent) { + if(!isset($this->parent)) { $parentRoleString = $this->getParentRoleString(); $parentComponents = explode('::', $parentRoleString); $noOfRoles = php7_count($parentComponents); -- GitLab