diff --git a/gulliver/system/class.rbac.php b/gulliver/system/class.rbac.php index a9f5719a4..381698f5f 100644 --- a/gulliver/system/class.rbac.php +++ b/gulliver/system/class.rbac.php @@ -78,6 +78,7 @@ class RBAC 'users_Ajax.php' => array( 'availableUsers' => array('PM_FACTORY'), 'assign' => array('PM_FACTORY'), + 'changeView' => array(), 'ofToAssign' => array('PM_FACTORY'), 'usersGroup' => array('PM_FACTORY'), 'canDeleteUser' => array('PM_USERS'), @@ -91,6 +92,7 @@ class RBAC 'loadAuthSourceByUID' => array('PM_USERS'), 'updateAuthServices' => array('PM_USERS'), 'usersList' => array('PM_USERS'), + 'updatePageSize' => array(), 'summaryUserData' => array('PM_USERS'), 'verifyIfUserAssignedAsSupervisor' => array('PM_USERS'), ) @@ -1475,18 +1477,20 @@ class RBAC */ public function allows($file, $action) { - $access = true; - $permissions = isset($this->authorizedActions[$file][$action]) ? $this->authorizedActions[$file][$action] : array(); - $totalPermissions = count($permissions); - $countAccess = 0; - foreach ($permissions as $key => $value) { - if ($this->userCanAccess($value) == 1) { - $countAccess++; + $access = false; + if (isset($this->authorizedActions[$file][$action])) { + $permissions = $this->authorizedActions[$file][$action]; + $totalPermissions = count($permissions); + $countAccess = 0; + foreach ($permissions as $key => $value) { + if ($this->userCanAccess($value) == 1) { + $countAccess++; + } + } + //Check if the user has all permissions that needed + if ($countAccess == $totalPermissions) { + $access = true; } - } - //Check if the user has all permissions that needed - if ($countAccess !== $totalPermissions) { - $access = false; } if (!$access) { diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php b/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php index 9d1ac7ece..87503f43d 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php @@ -1478,7 +1478,7 @@ class ProcessSupervisor $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC); if ($rsCriteria->next()) { - return true; + return true; } //Check if the user is in a group defined as supervisor $criteria = new \Criteria('workflow');