PMC-1082 Improve the function getAllUsersArray used in uxs Mode
This commit is contained in:
@@ -153,7 +153,6 @@ class RBAC
|
|||||||
'error' => [],
|
'error' => [],
|
||||||
'getUserArray' => ['PM_ALLCASES'],
|
'getUserArray' => ['PM_ALLCASES'],
|
||||||
'getCategoryArray' => ['PM_ALLCASES'],
|
'getCategoryArray' => ['PM_ALLCASES'],
|
||||||
'getAllUsersArray' => ['PM_ALLCASES'],
|
|
||||||
'getStatusArray' => ['PM_ALLCASES'],
|
'getStatusArray' => ['PM_ALLCASES'],
|
||||||
'getProcessArray' => ['PM_ALLCASES'],
|
'getProcessArray' => ['PM_ALLCASES'],
|
||||||
'getProcesses' => ['PM_ALLCASES'],
|
'getProcesses' => ['PM_ALLCASES'],
|
||||||
|
|||||||
@@ -325,7 +325,6 @@ class Home extends Controller
|
|||||||
// settings vars and rendering
|
// settings vars and rendering
|
||||||
$this->setVar('statusValues', $this->getStatusArray($httpData->t, $this->userUid));
|
$this->setVar('statusValues', $this->getStatusArray($httpData->t, $this->userUid));
|
||||||
$this->setVar('categoryValues', $this->getCategoryArray());
|
$this->setVar('categoryValues', $this->getCategoryArray());
|
||||||
$this->setVar('allUsersValues', $this->getAllUsersArray('search'));
|
|
||||||
$this->setVar('categoryTitle', G::LoadTranslation("ID_CATEGORY"));
|
$this->setVar('categoryTitle', G::LoadTranslation("ID_CATEGORY"));
|
||||||
$this->setVar('processTitle', G::LoadTranslation("ID_PROCESS"));
|
$this->setVar('processTitle', G::LoadTranslation("ID_PROCESS"));
|
||||||
$this->setVar('statusTitle', G::LoadTranslation("ID_STATUS"));
|
$this->setVar('statusTitle', G::LoadTranslation("ID_STATUS"));
|
||||||
@@ -683,34 +682,6 @@ class Home extends Controller
|
|||||||
return $category;
|
return $category;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllUsersArray($action)
|
|
||||||
{
|
|
||||||
global $oAppCache;
|
|
||||||
$users = array();
|
|
||||||
$users[] = array("CURRENT_USER",G::LoadTranslation("ID_CURRENT_USER"));
|
|
||||||
$users[] = array("",G::LoadTranslation("ID_ALL_USERS"));
|
|
||||||
|
|
||||||
if ($action == 'to_reassign') {
|
|
||||||
//now get users, just for the Search action
|
|
||||||
$cUsers = $oAppCache->getToReassignListCriteria(null);
|
|
||||||
$cUsers->addSelectColumn(AppCacheViewPeer::USR_UID);
|
|
||||||
|
|
||||||
if (g::MySQLSintaxis()) {
|
|
||||||
$cUsers->addGroupByColumn(AppCacheViewPeer::USR_UID);
|
|
||||||
}
|
|
||||||
|
|
||||||
$cUsers->addAscendingOrderByColumn(AppCacheViewPeer::APP_CURRENT_USER);
|
|
||||||
$oDataset = AppCacheViewPeer::doSelectRS($cUsers);
|
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
||||||
$oDataset->next();
|
|
||||||
while ($aRow = $oDataset->getRow()) {
|
|
||||||
$users[] = array($aRow['USR_UID'],$aRow['APP_CURRENT_USER']);
|
|
||||||
$oDataset->next();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $users;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getStatusArray($action, $userUid)
|
public function getStatusArray($action, $userUid)
|
||||||
{
|
{
|
||||||
$status = array();
|
$status = array();
|
||||||
|
|||||||
Reference in New Issue
Block a user