Permission
HOR-1720 HOR-1720 .
This commit is contained in:
@@ -143,8 +143,14 @@ class Applications
|
||||
$CriteriaCount = $oAppCache->getToReviseCountCriteria($userUid);
|
||||
break;
|
||||
case "to_reassign":
|
||||
$Criteria = $oAppCache->getToReassignListCriteria($userUid);
|
||||
$CriteriaCount = $oAppCache->getToReassignCountCriteria($userUid);
|
||||
GLOBAL $RBAC;
|
||||
if($RBAC->userCanAccess('PM_REASSIGNCASE') == 1){
|
||||
$Criteria = $oAppCache->getToReassignListCriteria($userUid);
|
||||
$CriteriaCount = $oAppCache->getToReassignCountCriteria($userUid);
|
||||
} else {
|
||||
$Criteria = $oAppCache->getToReassignSupervisorListCriteria($userUid);
|
||||
$CriteriaCount = $oAppCache->getToReassignSupervisorCountCriteria($userUid);
|
||||
}
|
||||
break;
|
||||
case "all":
|
||||
$Criteria = $oAppCache->getAllCasesListCriteria($userUid);
|
||||
|
||||
@@ -1183,6 +1183,36 @@ class AppCacheView extends BaseAppCacheView
|
||||
return $this->getToReassign($userUid, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the ALL cases list criteria for count by Supervisor
|
||||
* @return Criteria object $Criteria
|
||||
*/
|
||||
public function getToReassignSupervisorCountCriteria($userUid)
|
||||
{
|
||||
GLOBAL $RBAC;
|
||||
$aUser = $RBAC->userObj->load( $_SESSION['USER_LOGGED'] );
|
||||
|
||||
$aProcesses = $this->getProUidSupervisor($aUser['USR_UID']);
|
||||
$criteria = $this->getToReassign($userUid, true);
|
||||
$criteria->add(AppCacheViewPeer::PRO_UID, $aProcesses, Criteria::IN);
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the ALL cases list criteria for list by Supervisor
|
||||
* @return Criteria object $Criteria
|
||||
*/
|
||||
public function getToReassignSupervisorListCriteria($userUid)
|
||||
{
|
||||
GLOBAL $RBAC;
|
||||
$aUser = $RBAC->userObj->load( $_SESSION['USER_LOGGED'] );
|
||||
|
||||
$aProcesses = $this->getProUidSupervisor($aUser['USR_UID']);
|
||||
$criteria = $this->getToReassign($userUid, false);
|
||||
$criteria->add(AppCacheViewPeer::PRO_UID, $aProcesses, Criteria::IN);
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
public function getDefaultFields()
|
||||
{
|
||||
return array_merge(
|
||||
|
||||
Reference in New Issue
Block a user