PMCORE-2645

This commit is contained in:
Paula Quispe
2021-03-01 10:29:56 -04:00
parent 98a9b4bb47
commit fe9ef6317f

View File

@@ -426,11 +426,12 @@ class ListInbox extends BaseListInbox implements ListInterface
case 'to_reassign': case 'to_reassign':
global $RBAC; global $RBAC;
$criteria->add(ListInboxPeer::APP_STATUS, 'TO_DO', Criteria::EQUAL); $criteria->add(ListInboxPeer::APP_STATUS, 'TO_DO', Criteria::EQUAL);
// We will not consider without user threads
$criteria->add(ListInboxPeer::USR_UID, '', Criteria::NOT_EQUAL);
$user = new BmUser(); $user = new BmUser();
$listProcess = $user->getProcessToReassign(['PM_REASSIGNCASE','PM_REASSIGNCASE_SUPERVISOR']); $listProcess = $user->getProcessToReassign(['PM_REASSIGNCASE','PM_REASSIGNCASE_SUPERVISOR']);
// If is not a supervisor and does not have the permission for view all cases we can not list cases
//If is not a supervisor and does not have the permission for view all cases we can not list cases // If is a supervisor, we can list only his processes
//If is a supervisor, we can list only his processes
if ( if (
(empty($listProcess) && $RBAC->userCanAccess('PM_REASSIGNCASE') !== 1) || (empty($listProcess) && $RBAC->userCanAccess('PM_REASSIGNCASE') !== 1) ||
(is_array($listProcess) && count($listProcess) > 0) (is_array($listProcess) && count($listProcess) > 0)