HOR-374
HOR-374 HOR-374
This commit is contained in:
@@ -185,13 +185,13 @@ class workspaceTools
|
||||
$key = isset($matches['key']) ? $matches['key'] : $matches[2];
|
||||
$value = isset($matches['value']) ? $matches['value'] : $matches[3];
|
||||
|
||||
if($this->onedb){
|
||||
$dbInfo = $this->getDBInfo();
|
||||
if ($this->onedb) {
|
||||
$dbInfo = $this->getDBInfo();
|
||||
$dbPrefix = array('DB_NAME' => 'wf_', 'DB_USER' => 'wf_', 'DB_RBAC_NAME' => 'wf_', 'DB_RBAC_USER' => 'wf_', 'DB_REPORT_NAME' => 'wf_', 'DB_REPORT_USER' => 'wf_');
|
||||
if (array_search($key, array('DB_PASS', 'DB_RBAC_PASS', 'DB_REPORT_PASS'))) {
|
||||
$value = $dbInfo['DB_PASS'];
|
||||
}
|
||||
} else{
|
||||
if (array_search($key, array('DB_PASS', 'DB_RBAC_PASS', 'DB_REPORT_PASS'))) {
|
||||
$value = $dbInfo['DB_PASS'];
|
||||
}
|
||||
} else {
|
||||
$dbPrefix = array('DB_NAME' => 'wf_', 'DB_USER' => 'wf_', 'DB_RBAC_NAME' => 'rb_', 'DB_RBAC_USER' => 'rb_', 'DB_REPORT_NAME' => 'rp_', 'DB_REPORT_USER' => 'rp_');
|
||||
}
|
||||
|
||||
@@ -203,16 +203,16 @@ class workspaceTools
|
||||
/* Change the database name to the new workspace, following the standard
|
||||
* of prefix (either wf_, rp_, rb_) and the workspace name.
|
||||
*/
|
||||
if($this->unify){
|
||||
$nameDb = explode("_", $value);
|
||||
if(!isset($nameDb[1])){
|
||||
$dbName = $value;
|
||||
} else {
|
||||
$dbName = $dbPrefix[$key] . $nameDb[1];
|
||||
}
|
||||
}else {
|
||||
$dbName = $dbPrefix[$key] . $this->name;
|
||||
}
|
||||
if ($this->unify) {
|
||||
$nameDb = explode("_", $value);
|
||||
if (!isset($nameDb[1])) {
|
||||
$dbName = $value;
|
||||
} else {
|
||||
$dbName = $dbPrefix[$key] . $nameDb[1];
|
||||
}
|
||||
} else {
|
||||
$dbName = $dbPrefix[$key] . $this->name;
|
||||
}
|
||||
} else {
|
||||
$dbName = $value;
|
||||
}
|
||||
@@ -301,10 +301,10 @@ class workspaceTools
|
||||
$rpDetails = $this->getDBCredentials("rp");
|
||||
|
||||
$config = array('datasources' => array('workflow' => array('connection' => $wfDetails["dsn"], 'adapter' => $wfDetails["adapter"]
|
||||
), 'rbac' => array('connection' => $rbDetails["dsn"], 'adapter' => $rbDetails["adapter"]
|
||||
), 'rp' => array('connection' => $rpDetails["dsn"], 'adapter' => $rpDetails["adapter"]
|
||||
)
|
||||
)
|
||||
), 'rbac' => array('connection' => $rbDetails["dsn"], 'adapter' => $rbDetails["adapter"]
|
||||
), 'rp' => array('connection' => $rpDetails["dsn"], 'adapter' => $rpDetails["adapter"]
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if ($root) {
|
||||
@@ -327,8 +327,8 @@ class workspaceTools
|
||||
|
||||
$this->initPropel = true;
|
||||
|
||||
require_once ("propel/Propel.php");
|
||||
require_once ("creole/Creole.php");
|
||||
require_once("propel/Propel.php");
|
||||
require_once("creole/Creole.php");
|
||||
|
||||
Propel::initConfiguration($config);
|
||||
}
|
||||
@@ -397,10 +397,10 @@ class workspaceTools
|
||||
}
|
||||
|
||||
G::LoadSystem('database_' . strtolower($this->dbAdapter));
|
||||
if ($rbac == true){
|
||||
if ($rbac == true) {
|
||||
$this->db = new database($this->dbAdapter, $this->dbRbacHost, $this->dbRbacUser, $this->dbRbacPass, $this->dbRbacName);
|
||||
} else {
|
||||
$this->db = new database($this->dbAdapter, $this->dbHost, $this->dbUser, $this->dbPass, $this->dbName);
|
||||
$this->db = new database($this->dbAdapter, $this->dbHost, $this->dbUser, $this->dbPass, $this->dbName);
|
||||
}
|
||||
if (!$this->db->isConnected()) {
|
||||
$this->db->logQuery('No available connection to database!');
|
||||
@@ -437,7 +437,7 @@ class workspaceTools
|
||||
*/
|
||||
public function getSchema($rbac = false)
|
||||
{
|
||||
$oDataBase = $this->getDatabase($rbac);
|
||||
$oDataBase = $this->getDatabase($rbac);
|
||||
|
||||
$aOldSchema = array();
|
||||
|
||||
@@ -491,8 +491,8 @@ class workspaceTools
|
||||
/**
|
||||
* Upgrade triggers of tables (Database)
|
||||
*
|
||||
* @param bool $flagRecreate Recreate
|
||||
* @param string $language Language
|
||||
* @param bool $flagRecreate Recreate
|
||||
* @param string $language Language
|
||||
*
|
||||
* return void
|
||||
*/
|
||||
@@ -557,19 +557,7 @@ class workspaceTools
|
||||
//Update APP_DELEGATION.DEL_LAST_INDEX data
|
||||
$res = $appCache->updateAppDelegationDelLastIndex($lang, $flagRecreate);
|
||||
|
||||
CLI::logging("-> Verifying roles permissions in RBAC \n");
|
||||
//Update table RBAC permissions
|
||||
Bootstrap::LoadSystem( 'rbac' );
|
||||
$RBAC = & RBAC::getSingleton();
|
||||
$RBAC->initRBAC();
|
||||
$result = $RBAC->verifyPermissions();
|
||||
if (count($result) > 1) {
|
||||
foreach ($result as $item) {
|
||||
CLI::logging(" $item... \n");
|
||||
}
|
||||
} else {
|
||||
CLI::logging(" All roles permissions already updated \n");
|
||||
}
|
||||
|
||||
|
||||
CLI::logging("-> Creating triggers\n");
|
||||
|
||||
@@ -595,25 +583,25 @@ class workspaceTools
|
||||
|
||||
//close connection
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
$connection = Propel::getConnection( 'workflow' );
|
||||
$connection = Propel::getConnection('workflow');
|
||||
|
||||
$sql_sleep = "SELECT * FROM information_schema.processlist WHERE command = 'Sleep' and user = SUBSTRING_INDEX(USER(),'@',1) and db = DATABASE() ORDER BY id;";
|
||||
$stmt_sleep = $connection->createStatement();
|
||||
$rs_sleep = $stmt_sleep->executeQuery( $sql_sleep, ResultSet::FETCHMODE_ASSOC );
|
||||
$rs_sleep = $stmt_sleep->executeQuery($sql_sleep, ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($rs_sleep->next()) {
|
||||
$row_sleep = $rs_sleep->getRow();
|
||||
$oStatement_sleep = $connection->prepareStatement( "kill ". $row_sleep['ID'] );
|
||||
$oStatement_sleep = $connection->prepareStatement("kill " . $row_sleep['ID']);
|
||||
$oStatement_sleep->executeQuery();
|
||||
}
|
||||
|
||||
$sql_query = "SELECT * FROM information_schema.processlist WHERE user = SUBSTRING_INDEX(USER(),'@',1) and db = DATABASE() and time > 0 ORDER BY id;";
|
||||
$stmt_query = $connection->createStatement();
|
||||
$rs_query = $stmt_query->executeQuery( $sql_query, ResultSet::FETCHMODE_ASSOC );
|
||||
$rs_query = $stmt_query->executeQuery($sql_query, ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($rs_query->next()) {
|
||||
$row_query = $rs_query->getRow();
|
||||
$oStatement_query = $connection->prepareStatement( "kill ". $row_query['ID'] );
|
||||
$oStatement_query = $connection->prepareStatement("kill " . $row_query['ID']);
|
||||
$oStatement_query->executeQuery();
|
||||
}
|
||||
}
|
||||
@@ -623,9 +611,9 @@ class workspaceTools
|
||||
* fix the 32K issue, by migrating /files directory structure to an uid tree structure based.
|
||||
* @param $workspace got the site(s) the manager wants to upgrade
|
||||
*/
|
||||
public function upgradeCasesDirectoryStructure ($workspace)
|
||||
public function upgradeCasesDirectoryStructure($workspace)
|
||||
{
|
||||
define('PATH_DOCUMENT', PATH_DATA . 'sites/' . $workspace . '/' . 'files/');
|
||||
define('PATH_DOCUMENT', PATH_DATA . 'sites/' . $workspace . '/' . 'files/');
|
||||
$doclevel = explode('/', PATH_DOCUMENT);
|
||||
$length = sizeof(PATH_DOCUMENT);
|
||||
$filesDir = $doclevel[$length - 1];
|
||||
@@ -640,7 +628,7 @@ class workspaceTools
|
||||
$directory = glob(PATH_DOCUMENT . "*", GLOB_ONLYDIR);
|
||||
$dirslength = sizeof($directory);
|
||||
|
||||
if (! @chdir(PATH_DOCUMENT)) {
|
||||
if (!@chdir(PATH_DOCUMENT)) {
|
||||
CLI::logging(CLI::error("Cannot use Document directory. The upgrade must be done as root.\n"));
|
||||
return;
|
||||
}
|
||||
@@ -704,13 +692,13 @@ class workspaceTools
|
||||
G::LoadClass("configuration");
|
||||
$conf = new Configurations();
|
||||
if (!$conf->exists("ENVIRONMENT_SETTINGS")) {
|
||||
$conf->aConfig = array ("format" => '@userName (@firstName @lastName)',
|
||||
"dateFormat" => 'd/m/Y',
|
||||
"startCaseHideProcessInf" => false,
|
||||
"casesListDateFormat" => 'Y-m-d H:i:s',
|
||||
"casesListRowNumber" => 25,
|
||||
"casesListRefreshTime" => 120 );
|
||||
$conf->saveConfig( 'ENVIRONMENT_SETTINGS', '' );
|
||||
$conf->aConfig = array("format" => '@userName (@firstName @lastName)',
|
||||
"dateFormat" => 'd/m/Y',
|
||||
"startCaseHideProcessInf" => false,
|
||||
"casesListDateFormat" => 'Y-m-d H:i:s',
|
||||
"casesListRowNumber" => 25,
|
||||
"casesListRefreshTime" => 120);
|
||||
$conf->saveConfig('ENVIRONMENT_SETTINGS', '');
|
||||
}
|
||||
$conf->setDirectoryStructureVer(2);
|
||||
CLI::logging(CLI::info("Version Directory Structure is 2 now.\n"));
|
||||
@@ -736,18 +724,19 @@ class workspaceTools
|
||||
* @param bool $checkOnly only check if the upgrade is needed if true
|
||||
* @return array bool upgradeSchema for more information
|
||||
*/
|
||||
public function upgradeDatabase ($onedb = false, $checkOnly = false)
|
||||
public function upgradeDatabase($onedb = false, $checkOnly = false)
|
||||
{
|
||||
G::LoadClass("patch");
|
||||
$this->initPropel( true );
|
||||
$this->initPropel(true);
|
||||
p11835::$dbAdapter = $this->dbAdapter;
|
||||
p11835::isApplicable();
|
||||
$systemSchema = System::getSystemSchema($this->dbAdapter);
|
||||
$systemSchemaRbac = System::getSystemSchemaRbac($this->dbAdapter);// get the Rbac Schema
|
||||
$this->registerSystemTables(array_merge($systemSchema,$systemSchemaRbac));
|
||||
$this->upgradeSchema( $systemSchema );
|
||||
$this->upgradeSchema( $systemSchemaRbac, false, true, $onedb ); // perform Upgrade to Rbac
|
||||
$this->upgradeSchema($systemSchema);
|
||||
$this->upgradeSchema($systemSchemaRbac, false, true, $onedb); // perform Upgrade to Rbac
|
||||
$this->upgradeData();
|
||||
$this->checkRbacPermissions();//check or add new permissions
|
||||
|
||||
//There records in table "EMAIL_SERVER"
|
||||
$criteria = new Criteria("workflow");
|
||||
@@ -1302,7 +1291,7 @@ class workspaceTools
|
||||
//check function shell_exec
|
||||
$disabled_functions = ini_get('disable_functions');
|
||||
$flag = false;
|
||||
if ($disabled_functions!='') {
|
||||
if ($disabled_functions != '') {
|
||||
$arr = explode(',', $disabled_functions);
|
||||
sort($arr);
|
||||
if (in_array("shell_exec", $arr)) {
|
||||
@@ -1312,39 +1301,39 @@ class workspaceTools
|
||||
|
||||
// Check if mysql exist on server
|
||||
$flagFunction = null;
|
||||
if ( !$flag ) {
|
||||
if (!$flag) {
|
||||
$flagFunction = shell_exec('mysql --version');
|
||||
}
|
||||
|
||||
$arrayRegExpEngineSearch = array("/\)\s*TYPE\s*=\s*(InnoDB)/i", "/\)\s*TYPE\s*=\s*(MyISAM)/i");
|
||||
$arrayRegExpEngineSearch = array("/\)\s*TYPE\s*=\s*(InnoDB)/i", "/\)\s*TYPE\s*=\s*(MyISAM)/i");
|
||||
$arrayRegExpEngineReplace = array(") ENGINE=\\1 DEFAULT CHARSET=utf8", ") ENGINE=\\1");
|
||||
|
||||
if ( !$flag && !is_null($flagFunction) ) {
|
||||
if (!$flag && !is_null($flagFunction)) {
|
||||
//Replace TYPE by ENGINE
|
||||
$script = preg_replace($arrayRegExpEngineSearch, $arrayRegExpEngineReplace, file_get_contents($filename));
|
||||
|
||||
file_put_contents($filename,$script);
|
||||
file_put_contents($filename, $script);
|
||||
|
||||
$aHost = explode(':',$parameters['dbHost']);
|
||||
$aHost = explode(':', $parameters['dbHost']);
|
||||
$dbHost = $aHost[0];
|
||||
if(isset($aHost[1])){
|
||||
if (isset($aHost[1])) {
|
||||
$dbPort = $aHost[1];
|
||||
$command = 'mysql'
|
||||
. ' --host=' . $dbHost
|
||||
. ' --port=' . $dbPort
|
||||
. ' --user=' . $parameters['dbUser']
|
||||
. ' --password=' . str_replace('"', '\"', str_replace("'", "\'", quotemeta($parameters['dbPass'])))//no change! supports the type passwords: .\+*?[^]($)'"\"'
|
||||
. ' --database=' . mysql_real_escape_string($database)
|
||||
. ' --default_character_set utf8'
|
||||
. ' --execute="SOURCE '.$filename.'"';
|
||||
}else{
|
||||
. ' --host=' . $dbHost
|
||||
. ' --port=' . $dbPort
|
||||
. ' --user=' . $parameters['dbUser']
|
||||
. ' --password=' . str_replace('"', '\"', str_replace("'", "\'", quotemeta($parameters['dbPass'])))//no change! supports the type passwords: .\+*?[^]($)'"\"'
|
||||
. ' --database=' . mysql_real_escape_string($database)
|
||||
. ' --default_character_set utf8'
|
||||
. ' --execute="SOURCE ' . $filename . '"';
|
||||
} else {
|
||||
$command = 'mysql'
|
||||
. ' --host=' . $dbHost
|
||||
. ' --user=' . $parameters['dbUser']
|
||||
. ' --password=' . str_replace('"', '\"', str_replace("'", "\'", quotemeta($parameters['dbPass'])))//no change! supports the type passwords: .\+*?[^]($)'"\"'
|
||||
. ' --database=' . mysql_real_escape_string($database)
|
||||
. ' --default_character_set utf8'
|
||||
. ' --execute="SOURCE '.$filename.'"';
|
||||
. ' --host=' . $dbHost
|
||||
. ' --user=' . $parameters['dbUser']
|
||||
. ' --password=' . str_replace('"', '\"', str_replace("'", "\'", quotemeta($parameters['dbPass'])))//no change! supports the type passwords: .\+*?[^]($)'"\"'
|
||||
. ' --database=' . mysql_real_escape_string($database)
|
||||
. ' --default_character_set utf8'
|
||||
. ' --execute="SOURCE ' . $filename . '"';
|
||||
}
|
||||
shell_exec($command);
|
||||
} else {
|
||||
@@ -1431,7 +1420,7 @@ class workspaceTools
|
||||
$metafiles = array();
|
||||
foreach ($backup->listContent() as $backupFile) {
|
||||
$filename = $backupFile["filename"];
|
||||
if (strpos($filename, "/") === false && substr_compare($filename, ".meta", - 5, 5, true) === 0) {
|
||||
if (strpos($filename, "/") === false && substr_compare($filename, ".meta", -5, 5, true) === 0) {
|
||||
if (!$backup->extractList(array($filename), $tempDirectory)) {
|
||||
throw new Exception("Could not extract backup");
|
||||
}
|
||||
@@ -1445,7 +1434,7 @@ class workspaceTools
|
||||
$data = file_get_contents($metafile);
|
||||
$workspaceData = G::json_decode($data);
|
||||
CLI::logging("\n");
|
||||
workspaceTools::printInfo((array) $workspaceData);
|
||||
workspaceTools::printInfo((array)$workspaceData);
|
||||
}
|
||||
|
||||
G::rm_dir($tempDirectory);
|
||||
@@ -1458,7 +1447,7 @@ class workspaceTools
|
||||
$chmod = @chmod($filename, $perms);
|
||||
|
||||
if ($chgrp === false || $chmod === false || $chown === false) {
|
||||
if (strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN') {
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
exec("icacls \"" . $filename . "\" /grant Administrador:(D,WDAC) /T", $res);
|
||||
} else {
|
||||
CLI::logging(CLI::error("Failed to set permissions for $filename") . "\n");
|
||||
@@ -1524,7 +1513,7 @@ class workspaceTools
|
||||
}
|
||||
|
||||
$version = System::getVersion();
|
||||
$pmVersion = (preg_match("/^([\d\.]+).*$/", $version, $arrayMatch))? $arrayMatch[1] : ""; //Otherwise: Branch master
|
||||
$pmVersion = (preg_match("/^([\d\.]+).*$/", $version, $arrayMatch)) ? $arrayMatch[1] : ""; //Otherwise: Branch master
|
||||
|
||||
CLI::logging(CLI::warning("
|
||||
Warning: A workspace from a newer version of ProcessMaker can NOT be restored in an older version of
|
||||
@@ -1604,10 +1593,10 @@ class workspaceTools
|
||||
CLI::logging(CLI::error("Could not get the shared folder permissions, not changing workspace permissions") . "\n");
|
||||
}
|
||||
list ($dbHost, $dbUser, $dbPass) = @explode(SYSTEM_HASH, G::decrypt(HASH_INSTALLATION, SYSTEM_HASH));
|
||||
if($port != ''){
|
||||
$dbHost = $dbHost.$port; //127.0.0.1:3306
|
||||
if ($port != '') {
|
||||
$dbHost = $dbHost . $port; //127.0.0.1:3306
|
||||
}
|
||||
$aParameters = array('dbHost'=>$dbHost,'dbUser'=>$dbUser,'dbPass'=>$dbPass);
|
||||
$aParameters = array('dbHost' => $dbHost, 'dbUser' => $dbUser, 'dbPass' => $dbPass);
|
||||
|
||||
//Restore
|
||||
if (!defined("SYS_SYS")) {
|
||||
@@ -1618,7 +1607,7 @@ class workspaceTools
|
||||
define("PATH_DATA_SITE", PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP);
|
||||
}
|
||||
|
||||
$pmVersionWorkspaceToRestore = (preg_match("/^([\d\.]+).*$/", $metadata->PM_VERSION, $arrayMatch))? $arrayMatch[1] : "";
|
||||
$pmVersionWorkspaceToRestore = (preg_match("/^([\d\.]+).*$/", $metadata->PM_VERSION, $arrayMatch)) ? $arrayMatch[1] : "";
|
||||
|
||||
CLI::logging("> Connecting to system database in '$dbHost'\n");
|
||||
$link = mysql_connect($dbHost, $dbUser, $dbPass);
|
||||
@@ -1638,13 +1627,13 @@ class workspaceTools
|
||||
$dbName = $newDBNames[$db->name];
|
||||
|
||||
if (mysql_select_db($dbName, $link)) {
|
||||
if(!$overwrite) {
|
||||
if (!$overwrite) {
|
||||
throw new Exception("Destination Database already exist (use -o to overwrite)");
|
||||
}
|
||||
}
|
||||
|
||||
CLI::logging("+> Restoring database {$db->name} to $dbName\n");
|
||||
$workspace->executeSQLScript($dbName, "$tempDirectory/{$db->name}.sql",$aParameters);
|
||||
$workspace->executeSQLScript($dbName, "$tempDirectory/{$db->name}.sql", $aParameters);
|
||||
$workspace->createDBUser($dbName, $db->pass, "localhost", $dbName);
|
||||
$workspace->createDBUser($dbName, $db->pass, "%", $dbName);
|
||||
}
|
||||
@@ -1716,9 +1705,9 @@ class workspaceTools
|
||||
|
||||
$arrayPathInfo = pathinfo($file);
|
||||
|
||||
$f = ($arrayPathInfo["dirname"] == ".")? $dirHotfix . PATH_SEP . $file : $file;
|
||||
$f = ($arrayPathInfo["dirname"] == ".") ? $dirHotfix . PATH_SEP . $file : $file;
|
||||
|
||||
$swv = 1;
|
||||
$swv = 1;
|
||||
$msgv = "";
|
||||
|
||||
if (!file_exists($dirHotfix)) {
|
||||
@@ -1726,13 +1715,13 @@ class workspaceTools
|
||||
}
|
||||
|
||||
if (!file_exists($f)) {
|
||||
$swv = 0;
|
||||
$msgv = $msgv . (($msgv != "")? "\n": null) . "- The file \"$f\" does not exist";
|
||||
$swv = 0;
|
||||
$msgv = $msgv . (($msgv != "") ? "\n" : null) . "- The file \"$f\" does not exist";
|
||||
}
|
||||
|
||||
if ($arrayPathInfo["extension"] != "tar") {
|
||||
$swv = 0;
|
||||
$msgv = $msgv . (($msgv != "")? "\n": null) . "- The file extension \"$file\" is not \"tar\"";
|
||||
$swv = 0;
|
||||
$msgv = $msgv . (($msgv != "") ? "\n" : null) . "- The file extension \"$file\" is not \"tar\"";
|
||||
}
|
||||
|
||||
if ($swv == 1) {
|
||||
@@ -1996,7 +1985,7 @@ class workspaceTools
|
||||
}
|
||||
|
||||
$appCache = new AppCacheView();
|
||||
$users = new Users();
|
||||
$users = new Users();
|
||||
$case = new Cases();
|
||||
|
||||
//Select data CANCELLED
|
||||
@@ -2048,18 +2037,18 @@ class workspaceTools
|
||||
if($row["DEL_THREAD_STATUS"] == 'OPEN'){
|
||||
//Update information about the previous_user
|
||||
$row["DEL_PREVIOUS_USR_UID"] = $row["PREVIOUS_USR_UID"];
|
||||
$criteriaUser->add( UsersPeer::USR_UID, $row["PREVIOUS_USR_UID"] );
|
||||
$criteriaUser->add(UsersPeer::USR_UID, $row["PREVIOUS_USR_UID"]);
|
||||
$datasetU = UsersPeer::doSelectRS($criteriaUser);
|
||||
$datasetU->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$datasetU->next();
|
||||
$arrayUsers = $datasetU->getRow();
|
||||
$row["DEL_PREVIOUS_USR_USERNAME"] = $arrayUsers["USR_USERNAME"];
|
||||
$row["DEL_PREVIOUS_USR_FIRSTNAME"]= $arrayUsers["USR_FIRSTNAME"];
|
||||
$row["DEL_PREVIOUS_USR_FIRSTNAME"] = $arrayUsers["USR_FIRSTNAME"];
|
||||
$row["DEL_PREVIOUS_USR_LASTNAME"] = $arrayUsers["USR_LASTNAME"];
|
||||
//Update the due date
|
||||
$row["DEL_DUE_DATE"] = $row["DEL_TASK_DUE_DATE"];
|
||||
$row["DEL_DUE_DATE"] = $row["DEL_TASK_DUE_DATE"];
|
||||
$listInbox = new ListInbox();
|
||||
$listInbox->remove($row["APP_UID"],$row["DEL_INDEX"]);
|
||||
$listInbox->remove($row["APP_UID"], $row["DEL_INDEX"]);
|
||||
$listInbox->setDeleted(false);
|
||||
$listInbox->create($row, $isSelfService);
|
||||
} else {
|
||||
@@ -2280,6 +2269,7 @@ class workspaceTools
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register system tables in a file
|
||||
*
|
||||
@@ -2298,4 +2288,23 @@ class workspaceTools
|
||||
throw (new Exception( G::LoadTranslation('ID_FILE_NOT_WRITEABLE', SYS_LANG, array($sysTablesIniFile) ) ));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*return void
|
||||
*/
|
||||
public function checkRbacPermissions(){
|
||||
CLI::logging("-> Verifying roles permissions in RBAC \n");
|
||||
//Update table RBAC permissions
|
||||
Bootstrap::LoadSystem('rbac');
|
||||
$RBAC = &RBAC::getSingleton();
|
||||
$RBAC->initRBAC();
|
||||
$result = $RBAC->verifyPermissions();
|
||||
if (count($result) > 1) {
|
||||
foreach ($result as $item) {
|
||||
CLI::logging(" $item... \n");
|
||||
}
|
||||
} else {
|
||||
CLI::logging(" All roles permissions already updated \n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ class Admin extends Controller
|
||||
public function pmLogo ($httpData)
|
||||
{
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
|
||||
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE', 'PM_SETUP_LOGO');
|
||||
|
||||
G::LoadClass( 'configuration' );
|
||||
$c = new Configurations();
|
||||
|
||||
@@ -24,7 +24,7 @@ class pmTables extends Controller
|
||||
public function index ($httpData)
|
||||
{
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
|
||||
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE', 'PM_SETUP_PM_TABLES' );
|
||||
|
||||
G::LoadClass( 'configuration' );
|
||||
$c = new Configurations();
|
||||
|
||||
@@ -11,6 +11,24 @@ SELECT 'PER_NAME','','00000000000000000000000000000016','en','Add Folders' UNION
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000017','en','Add file in folders' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000018','en','Cancel cases' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000019','en','Delete folders' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000020','en','Setup Logo' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000021','en','Setup Email' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000022','en','Setup Calendar' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000023','en','Setup Process Categories' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000024','en','Setup Clear Cache' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000025','en','Setup Heart Beat' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000026','en','Setup Environment' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000027','en','Setup PM Tables' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000028','en','Setup Login' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000029','en','Setup Dashborads' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000030','en','Setup Language' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000031','en','Setup Skin' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000032','en','Setup Case List Cache Builder' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000033','en','Setup Plugins' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000034','en','Setup User Authentication Sources' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000035','en','Setup Logs' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000036','en','Delete process cases' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000037','en','Edit personal info Calendar' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000013','en','Delete cases' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000012','en','WebDav' UNION ALL
|
||||
SELECT 'PER_NAME','','00000000000000000000000000000011','en','Dashboard' UNION ALL
|
||||
|
||||
@@ -11,6 +11,24 @@ INSERT INTO CONTENT (CON_CATEGORY,CON_PARENT,CON_ID,CON_LANG,CON_VALUE) VALUES
|
||||
('PER_NAME','','00000000000000000000000000000017','en','Add file in folders'),
|
||||
('PER_NAME','','00000000000000000000000000000018','en','Cancel cases'),
|
||||
('PER_NAME','','00000000000000000000000000000019','en','Delete folders'),
|
||||
('PER_NAME','','00000000000000000000000000000020','en','Setup Logo'),
|
||||
('PER_NAME','','00000000000000000000000000000021','en','Setup Email'),
|
||||
('PER_NAME','','00000000000000000000000000000022','en','Setup Calendar'),
|
||||
('PER_NAME','','00000000000000000000000000000023','en','Setup Process Categories'),
|
||||
('PER_NAME','','00000000000000000000000000000024','en','Setup Clear Cache'),
|
||||
('PER_NAME','','00000000000000000000000000000025','en','Setup Heart Beat'),
|
||||
('PER_NAME','','00000000000000000000000000000026','en','Setup Environment'),
|
||||
('PER_NAME','','00000000000000000000000000000027','en','Setup PM Tables'),
|
||||
('PER_NAME','','00000000000000000000000000000028','en','Setup Login'),
|
||||
('PER_NAME','','00000000000000000000000000000029','en','Setup Dashborads'),
|
||||
('PER_NAME','','00000000000000000000000000000030','en','Setup Language'),
|
||||
('PER_NAME','','00000000000000000000000000000031','en','Setup Skin'),
|
||||
('PER_NAME','','00000000000000000000000000000032','en','Setup Case List Cache Builder'),
|
||||
('PER_NAME','','00000000000000000000000000000033','en','Setup Plugins'),
|
||||
('PER_NAME','','00000000000000000000000000000034','en','Setup User Authentication Sources'),
|
||||
('PER_NAME','','00000000000000000000000000000035','en','Setup Logs'),
|
||||
('PER_NAME','','00000000000000000000000000000036','en','Delete process cases'),
|
||||
('PER_NAME','','00000000000000000000000000000037','en','Edit personal info Calendar'),
|
||||
('PER_NAME','','00000000000000000000000000000013','en','Delete cases'),
|
||||
('PER_NAME','','00000000000000000000000000000012','en','WebDav'),
|
||||
('PER_NAME','','00000000000000000000000000000011','en','Dashboard'),
|
||||
|
||||
@@ -27,101 +27,221 @@ global $RBAC;
|
||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oServerConf = & serverConf::getSingleton();
|
||||
$sAudit = $oServerConf->getAuditLogProperty( 'AL_OPTION', SYS_SYS );
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
$oServerConf = &serverConf::getSingleton();
|
||||
$sAudit = $oServerConf->getAuditLogProperty('AL_OPTION', SYS_SYS);
|
||||
$licensedFeatures = &PMLicensedFeatures::getSingleton();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1 ) {
|
||||
//settings options
|
||||
// $G_TMP_MENU->AddIdRawOption('LOGO', 'uplogo', G::LoadTranslation('ID_LOGO'), 'icon-pmlogo.png', '', 'settings');
|
||||
$G_TMP_MENU->AddIdRawOption('LOGO', '../admin/pmLogo', G::LoadTranslation('ID_LOGO'), 'icon-pmlogo.png','', 'settings');
|
||||
$G_TMP_MENU->AddIdRawOption("EMAIL_SERVER", "../emailServer/emailServer", G::LoadTranslation("ID_EMAIL_SERVER_TITLE"), "icon-email-settings1.png", "", "settings");
|
||||
$G_TMP_MENU->AddIdRawOption('CALENDAR', 'calendarList', G::LoadTranslation('ID_CALENDAR'), 'icon-calendar.png', '', 'settings' );
|
||||
//if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1)
|
||||
// $G_TMP_MENU->AddIdRawOption('CASES_LIST_SETUP', '../cases/casesListSetup', G::LoadTranslation('ID_CASES_LIST_SETUP'), "",'', 'settings');
|
||||
$G_TMP_MENU->AddIdRawOption('PROCESS_CATEGORY', '../processCategory/processCategoryList', G::LoadTranslation('ID_PROCESS_CATEGORY'), "rules.png",'', 'settings');
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
$pmSetupPermission = true;
|
||||
if ($RBAC->userCanAccess('PM_SETUP_LOGO') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'LOGO', '../admin/pmLogo',
|
||||
G::LoadTranslation('ID_LOGO'),
|
||||
'icon-pmlogo.png', '','settings'
|
||||
);
|
||||
}
|
||||
if ($RBAC->userCanAccess('PM_SETUP_EMAIL') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
"EMAIL_SERVER", "../emailServer/emailServer",
|
||||
G::LoadTranslation("ID_EMAIL_SERVER_TITLE"),
|
||||
"icon-email-settings1.png", "", "settings"
|
||||
);
|
||||
}
|
||||
if ($RBAC->userCanAccess('PM_SETUP_CALENDAR') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'CALENDAR', 'calendarList',
|
||||
G::LoadTranslation('ID_CALENDAR'),
|
||||
'icon-calendar.png', '', 'settings'
|
||||
);
|
||||
}
|
||||
if ($RBAC->userCanAccess('PM_SETUP_PROCESS_CATEGORIES') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PROCESS_CATEGORY', '../processCategory/processCategoryList',
|
||||
G::LoadTranslation('ID_PROCESS_CATEGORY'),
|
||||
"rules.png", '', 'settings'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('LANGUAGES', 'languages', G::LoadTranslation('ID_LANGUAGES'), 'icon-language.png', '', 'settings');
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP_LANGUAGE') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'LANGUAGES', 'languages',
|
||||
G::LoadTranslation('ID_LANGUAGES'),
|
||||
'icon-language.png','', 'settings'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1 ) {
|
||||
$G_TMP_MENU->AddIdRawOption('SKINS', 'skinsList', G::LoadTranslation('ID_SKINS'), 'icon-skins.png', '', 'settings');
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP_SKIN') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'SKINS', 'skinsList',
|
||||
G::LoadTranslation('ID_SKINS'),
|
||||
'icon-skins.png', '', 'settings'
|
||||
);
|
||||
}
|
||||
if (!$partnerFlag) {
|
||||
$G_TMP_MENU->AddIdRawOption('HEARTBEAT', 'processHeartBeatConfig', G::LoadTranslation('ID_HEARTBEAT_CONFIG'), "heartBeat.jpg",'', 'settings');
|
||||
if ($RBAC->userCanAccess('PM_SETUP_HEART_BEAT') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'HEARTBEAT', 'processHeartBeatConfig',
|
||||
G::LoadTranslation('ID_HEARTBEAT_CONFIG'),
|
||||
"heartBeat.jpg", '', 'settings'
|
||||
);
|
||||
}
|
||||
}
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ENVIRONMENT') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'ENVIRONMENT_SETTINGS', 'environmentSettings',
|
||||
G::LoadTranslation('ID_ENVIRONMENT_SETTINGS'),
|
||||
"", '', 'settings'
|
||||
);
|
||||
}
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption('ENVIRONMENT_SETTINGS', 'environmentSettings', G::LoadTranslation('ID_ENVIRONMENT_SETTINGS'), "",'', 'settings');
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('APPCACHEVIEW_SETUP', '../setup/appCacheViewConf', G::LoadTranslation('ID_APPCACHE_SETUP'), "",'', 'settings');
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'APPCACHEVIEW_SETUP', '../setup/appCacheViewConf',
|
||||
G::LoadTranslation('ID_APPCACHE_SETUP'),
|
||||
"", '', 'settings'
|
||||
);
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('CLEAR_CACHE', 'clearCompiled', G::LoadTranslation('ID_CLEAR_CACHE'), 'icon-rebuild-clean.png', "", 'settings' );
|
||||
//$G_TMP_MENU->AddIdRawOption('ADDITIONAL_TABLES', '../additionalTables/additionalTablesList', G::LoadTranslation('ID_ADDITIONAL_TABLES'), 'icon-tables.png','', 'settings');
|
||||
//$G_TMP_MENU->AddIdRawOption('REPORT_TABLES', '../reportTables/main', 'Report Tables', 'icon-tables.png','', 'settings');
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption('PM_TABLES', '../pmTables', G::LoadTranslation('ID_ADDITIONAL_TABLES'), 'icon-tables.png','', 'settings');
|
||||
$G_TMP_MENU->AddIdRawOption('LOGIN', 'loginSettings', G::LoadTranslation('LOGIN'), "",'', 'settings');
|
||||
$G_TMP_MENU->AddIdRawOption('DASHBOARD', '../dashboard/dashletsList', ucfirst(G::LoadTranslation('ID_DASHBOARD')), '', '', 'settings');
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
||||
$G_TMP_MENU->AddIdRawOption('STRATEGIC_DASHBOARD', '../strategicDashboard/dashboardList', ucfirst(G::LoadTranslation('ID_STRATEGIC_DASHBOARD')), '', '', 'settings');
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP_CLEAR_CACHE') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'CLEAR_CACHE', 'clearCompiled',
|
||||
G::LoadTranslation('ID_CLEAR_CACHE'),
|
||||
'icon-rebuild-clean.png', "", 'settings'
|
||||
);
|
||||
}
|
||||
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09') || $licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
|
||||
$G_TMP_MENU->AddIdRawOption('PMGMAIL', '../pmGmail/formPMGmail', ucfirst(G::LoadTranslation('ID_GOOGLEINTEGRATION')), '', '', 'settings');
|
||||
if ($RBAC->userCanAccess('PM_SETUP_PM_TABLES') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PM_TABLES', '../pmTables',
|
||||
G::LoadTranslation('ID_ADDITIONAL_TABLES'),
|
||||
'icon-tables.png', '', 'settings'
|
||||
);
|
||||
}
|
||||
if ($RBAC->userCanAccess('PM_SETUP_LOGIN') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'LOGIN', 'loginSettings',
|
||||
G::LoadTranslation('LOGIN'),
|
||||
"", '', 'settings'
|
||||
);
|
||||
}
|
||||
if ($RBAC->userCanAccess('PM_SETUP_DASHBOARDS') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'DASHBOARD', '../dashboard/dashletsList',
|
||||
ucfirst(G::LoadTranslation('ID_DASHBOARD')),
|
||||
'', '', 'settings'
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'STRATEGIC_DASHBOARD', '../strategicDashboard/dashboardList',
|
||||
ucfirst(G::LoadTranslation('ID_STRATEGIC_DASHBOARD')),
|
||||
'', '', 'settings'
|
||||
);
|
||||
}
|
||||
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PMGMAIL', '../pmGmail/formPMGmail',
|
||||
ucfirst(G::LoadTranslation('ID_PMGMAIL')),
|
||||
'', '', 'settings'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
}
|
||||
//tools options
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1 ) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1) {
|
||||
if (!$partnerFlag) {
|
||||
$G_TMP_MENU->AddIdRawOption('PLUGINS', 'pluginsMain', G::LoadTranslation('ID_PLUGINS_MANAGER'), 'icon-plugins.png', '', 'plugins');
|
||||
if ($RBAC->userCanAccess('PM_SETUP_PLUGINS') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PLUGINS', 'pluginsMain',
|
||||
G::LoadTranslation('ID_PLUGINS_MANAGER'),
|
||||
'icon-plugins.png', '', 'plugins'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//users options
|
||||
if ($RBAC->userCanAccess('PM_USERS') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('USERS', '../users/users_List', G::LoadTranslation('ID_USERS_LIST'), 'icon-webservices.png', '', 'users');
|
||||
|
||||
if ($RBAC->userCanAccess('PM_USERS') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('USERS', '../users/users_List', G::LoadTranslation('ID_USERS_LIST'),
|
||||
'icon-webservices.png', '', 'users');
|
||||
$G_TMP_MENU->AddIdRawOption('GROUPS', '../groups/groups', G::LoadTranslation('ID_GROUPS'), '', '', 'users');
|
||||
$G_TMP_MENU->AddIdRawOption('DEPARTAMENTS', '../departments/departments', G::LoadTranslation('ID_DEPARTMENTS_USERS'), '', '', 'users');
|
||||
$G_TMP_MENU->AddIdRawOption('ROLES', '../roles/roles_List', G::LoadTranslation('ID_ROLES'), '', '', 'users');
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'DEPARTAMENTS', '../departments/departments',
|
||||
G::LoadTranslation('ID_DEPARTMENTS_USERS'),
|
||||
'', '', 'users'
|
||||
);
|
||||
$G_TMP_MENU->AddIdRawOption('ROLES', '../roles/roles_List',
|
||||
G::LoadTranslation('ID_ROLES'),
|
||||
'', '', 'users'
|
||||
);
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') == 1 && $RBAC->userCanAccess('PM_USERS') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('AUTHSOURCES', '../authSources/authSources_List', G::LoadTranslation('ID_AUTH_SOURCES'), '', '', 'users');
|
||||
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') === 1 && $RBAC->userCanAccess('PM_USERS') === 1 && $RBAC->userCanAccess
|
||||
('PM_SETUP_USERS_AUTHENTICATION_SOURCES') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'AUTHSOURCES', '../authSources/authSources_List',
|
||||
G::LoadTranslation('ID_AUTH_SOURCES'),
|
||||
'', '', 'users'
|
||||
);
|
||||
$G_TMP_MENU->AddIdRawOption('UX', '../admin/uxList', G::LoadTranslation('ID_USER_EXPERIENCE'), '', '', 'users');
|
||||
$G_TMP_MENU->AddIdRawOption('SYSTEM', '../admin/system', G::LoadTranslation('ID_SYSTEM'), '', '', 'settings');
|
||||
$G_TMP_MENU->AddIdRawOption('INFORMATION', '../setup/systemInfo?option=processInfo', G::LoadTranslation('ID_SYSTEM_INFO'), '', '', 'settings');
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'INFORMATION', '../setup/systemInfo?option=processInfo',
|
||||
G::LoadTranslation('ID_SYSTEM_INFO'),
|
||||
'', '', 'settings'
|
||||
);
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1 && $RBAC->userCanAccess('PM_SETUP_LOGS') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption('EVENT', '../events/eventList', G::LoadTranslation('ID_EVENTS'), '', '', 'logs');
|
||||
$G_TMP_MENU->AddIdRawOption('LOG_CASE_SCHEDULER', '../cases/cases_Scheduler_Log', G::LoadTranslation('ID_CASE_SCHEDULER'), "icon-logs-list.png",'', 'logs');
|
||||
$G_TMP_MENU->AddIdRawOption("CRON", "../setup/cron", G::LoadTranslation("ID_CRON_ACTIONS"), null, null, "logs");
|
||||
$G_TMP_MENU->AddIdRawOption('EMAILS', '../mails/emailList', ucfirst (strtolower ( G::LoadTranslation('ID_EMAILS'))), '', '', 'logs');
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'LOG_CASE_SCHEDULER', '../cases/cases_Scheduler_Log',
|
||||
G::LoadTranslation('ID_CASE_SCHEDULER'),
|
||||
"icon-logs-list.png", '', 'logs'
|
||||
);
|
||||
$G_TMP_MENU->AddIdRawOption("CRON", "../setup/cron", G::LoadTranslation("ID_CRON_ACTIONS"), null, null, 'logs');
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'EMAILS', '../mails/emailList',
|
||||
ucfirst(strtolower(G::LoadTranslation('ID_EMAILS'))),
|
||||
'', '', 'logs'
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (isset($sAudit) && $sAudit != false && $licensedFeatures->verifyfeature('vtSeHNhT0JnSmo1bTluUVlTYUxUbUFSVStEeXVqc1pEUG5EeXc0MGd2Q3ErYz0=')) {
|
||||
$G_TMP_MENU->AddIdRawOption('AUDIT_LOG', '../setup/auditLog', ucfirst (G::LoadTranslation('ID_AUDITLOG_DISPLAY')), '', '', 'logs');
|
||||
if (isset($sAudit) && $sAudit !== false && $licensedFeatures->verifyfeature
|
||||
('vtSeHNhT0JnSmo1bTluUVlTYUxUbUFSVStEeXVqc1pEUG5EeXc0MGd2Q3ErYz0=')
|
||||
) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'AUDIT_LOG', '../setup/auditLog',
|
||||
ucfirst(G::LoadTranslation('ID_AUDITLOG_DISPLAY')),
|
||||
'', '', 'logs'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess("PM_SETUP") == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption("PM_REQUIREMENTS", "../setup/systemInfo", G::LoadTranslation("ID_PROCESSMAKER_REQUIREMENTS_CHECK"), "", "", "settings");
|
||||
$G_TMP_MENU->AddIdRawOption("PHP_INFO", "../setup/systemInfo?option=php", G::LoadTranslation("ID_PHP_INFO"), "", "", "settings");
|
||||
//$G_TMP_MENU->AddIdRawOption("PHP_MAINTENANCE", "../admin/maintenance", 'Maintenance', "", "", "settings");
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PM_REQUIREMENTS', '../setup/systemInfo',
|
||||
G::LoadTranslation('ID_PROCESSMAKER_REQUIREMENTS_CHECK'),
|
||||
'', '', 'settings'
|
||||
);
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PHP_INFO', '../setup/systemInfo?option=php',
|
||||
G::LoadTranslation('ID_PHP_INFO'),
|
||||
'','', 'settings'
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('vtSeHNhT0JnSmo1bTluUVlTYUxUbUFSVStEeXVqc1pEUG5EeXc0MGd2Q3ErYz0=')) {
|
||||
$G_TMP_MENU->AddIdRawOption("AUDIT_LOG", "auditLogConfig", G::LoadTranslation("ID_AUDITLOG_DISPLAY"), "", "", "settings");
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
"AUDIT_LOG", "auditLogConfig",
|
||||
G::LoadTranslation("ID_AUDITLOG_DISPLAY"),
|
||||
"", "","settings"
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
@@ -151,18 +271,34 @@ if ($licenseStatusInfo["message"] != "") {
|
||||
$licStatusMsg = " <font color=\"red\">(" . $licenseStatusInfo["message"] . ")</font>";
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($RBAC->userCanAccess("PM_SETUP") == 1) {
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$G_TMP_MENU->AddIdRawOption("PMENTERPRISE", "../enterprise/addonsStore", G::LoadTranslation('ID_MENU_NAME') . $licStatusMsg, "", "", "plugins");
|
||||
if ($RBAC->userCanAccess('PM_SETUP_CASES_LIST_CACHE_BUILDER') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PMENTERPRISE', '../enterprise/addonsStore',
|
||||
G::LoadTranslation('ID_MENU_NAME') .$licStatusMsg,
|
||||
'', '', 'plugins'
|
||||
);
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'CASES_LIST_SETUP', '../cases/casesListSetup',
|
||||
G::LoadTranslation('ID_CUSTOM_CASES_LISTS'),
|
||||
'', '', 'settings');
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$G_TMP_MENU->AddIdRawOption("CASES_LIST_SETUP", "../cases/casesListSetup", G::LoadTranslation("ID_CUSTOM_CASES_LISTS"), "", "", "settings");
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$oObject = $oPluginRegistry->getPlugin("actionsByEmail");
|
||||
if (!(get_class($oObject) === "actionsByEmailPlugin") &&
|
||||
$licensedFeatures->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
||||
$G_TMP_MENU->AddIdRawOption('PM_ACTIONS_BY_EMAIL_LOGS', '../actionsByEmail/ActionByEmail.php', G::LoadTranslation("ID_ACTIONS_BY_EMAIL_LOG"), '', '', 'logs');
|
||||
$licensedFeatures->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=') &&
|
||||
$RBAC->userCanAccess('PM_SETUP_LOGS') == 1
|
||||
) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PM_ACTIONS_BY_EMAIL_LOGS',
|
||||
'../actionsByEmail/ActionByEmail.php',
|
||||
G::LoadTranslation("ID_ACTIONS_BY_EMAIL_LOG"),
|
||||
'', '', 'logs'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
G::LoadClass( 'configuration' );
|
||||
$c = new Configurations();
|
||||
|
||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||
$access = $RBAC->requirePermissions( 'PM_USERS' );
|
||||
if ($access != 1) {
|
||||
switch ($access) {
|
||||
case - 1:
|
||||
|
||||
@@ -23,16 +23,17 @@
|
||||
*/
|
||||
|
||||
global $RBAC;
|
||||
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
$resultRbac = $RBAC->requirePermissions('PM_SETUP_ADVANCE', 'PM_SETUP_LOGS');
|
||||
if (!$resultRbac) {
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
}
|
||||
|
||||
G::LoadClass( 'configuration' );
|
||||
G::LoadClass('configuration');
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( 'eventList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||
$configPage = $c->getConfiguration('eventList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_SUB_MENU = 'logs';
|
||||
@@ -40,52 +41,51 @@ $G_ID_MENU_SELECTED = 'logs';
|
||||
$G_ID_SUB_MENU_SELECTED = 'EVENT';
|
||||
|
||||
//get values for the comboBoxes
|
||||
$userUid = (isset( $_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||
$status = array (array ('',G::LoadTranslation( 'ID_ALL' )
|
||||
),array ("PENDING",G::LoadTranslation( 'ID_OPEN' )
|
||||
),array ("COMPLETED",G::LoadTranslation( 'ID_CLOSE' )
|
||||
$userUid = (isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||
$status = array(array('', G::LoadTranslation('ID_ALL')
|
||||
), array("PENDING", G::LoadTranslation('ID_OPEN')
|
||||
), array("COMPLETED", G::LoadTranslation('ID_CLOSE')
|
||||
)
|
||||
);
|
||||
$type = array (array ('',G::LoadTranslation( 'ID_ALL' )
|
||||
),array ('SEND_MESSAGE',G::LoadTranslation( 'ID_EVENT_MESSAGE' )
|
||||
),array ('EXECUTE_TRIGGER',G::LoadTranslation( 'ID_EVENT_TIMER' )
|
||||
),array ('EXECUTE_CONDITIONAL_TRIGGER',G::LoadTranslation( 'ID_EVENT_CONDITIONAL' )
|
||||
$type = array(array('', G::LoadTranslation('ID_ALL')
|
||||
), array('SEND_MESSAGE', G::LoadTranslation('ID_EVENT_MESSAGE')
|
||||
), array('EXECUTE_TRIGGER', G::LoadTranslation('ID_EVENT_TIMER')
|
||||
), array('EXECUTE_CONDITIONAL_TRIGGER', G::LoadTranslation('ID_EVENT_CONDITIONAL')
|
||||
)
|
||||
);
|
||||
$processes = getProcessArray( $userUid );
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'events/eventList', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'events/eventList' ); //adding a html file .html.
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('events/eventList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('events/eventList'); //adding a html file .html.
|
||||
//sending the columns to display in grid
|
||||
$oHeadPublisher->assign( 'typeValues', $type );
|
||||
$oHeadPublisher->assign( 'statusValues', $status );
|
||||
$oHeadPublisher->assign( 'processValues', $processes );
|
||||
$oHeadPublisher->assign('typeValues', $type);
|
||||
$oHeadPublisher->assign('statusValues', $status);
|
||||
$oHeadPublisher->assign('processValues', $processes);
|
||||
|
||||
function getProcessArray ($userUid)
|
||||
{
|
||||
function getProcessArray($userUid) {
|
||||
global $oAppCache;
|
||||
require_once ("classes/model/AppCacheView.php");
|
||||
require_once("classes/model/AppCacheView.php");
|
||||
|
||||
$processes = Array ();
|
||||
$processes[] = array ('',G::LoadTranslation( 'ID_ALL_PROCESS' ));
|
||||
$processes = array();
|
||||
$processes[] = array('', G::LoadTranslation('ID_ALL_PROCESS'));
|
||||
|
||||
$cProcess = new Criteria( 'workflow' );
|
||||
$cProcess = new Criteria('workflow');
|
||||
$cProcess->clearSelectColumns();
|
||||
$cProcess->addSelectColumn( AppCacheViewPeer::PRO_UID );
|
||||
$cProcess->addSelectColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||
$cProcess->setDistinct( AppCacheViewPeer::PRO_UID );
|
||||
$cProcess->addSelectColumn(AppCacheViewPeer::PRO_UID);
|
||||
$cProcess->addSelectColumn(AppCacheViewPeer::APP_PRO_TITLE);
|
||||
$cProcess->setDistinct(AppCacheViewPeer::PRO_UID);
|
||||
|
||||
$cProcess->addAscendingOrderByColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||
$cProcess->addAscendingOrderByColumn(AppCacheViewPeer::APP_PRO_TITLE);
|
||||
|
||||
$oDataset = AppCacheViewPeer::doSelectRS( $cProcess );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset = AppCacheViewPeer::doSelectRS($cProcess);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$processes[] = array ($aRow['PRO_UID'],$aRow['APP_PRO_TITLE']);
|
||||
$processes[] = array($aRow['PRO_UID'], $aRow['APP_PRO_TITLE']);
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,29 +21,33 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||
if ($access != 1) {
|
||||
$resultRbac = $RBAC_Response = $RBAC->requirePermissions("PM_USERS");
|
||||
if (!$resultRbac) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
global $RBAC;
|
||||
$access = $RBAC->userCanAccess('PM_USERS');
|
||||
if ($access !== 1) {
|
||||
switch ($access) {
|
||||
case - 1:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
case -1:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
case - 2:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
case -2:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
default:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
|
||||
@@ -54,16 +58,16 @@ $G_ID_SUB_MENU_SELECTED = 'GROUPS';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
G::LoadClass( 'configuration' );
|
||||
G::LoadClass('configuration');
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$configEnv = $c->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||
$configPage = $c->getConfiguration('groupList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$configEnv = $c->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'groups/groupsList', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'groups/groupsList' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'CONFIG', $Config );
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('groups/groupsList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('groups/groupsList'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('CONFIG', $Config);
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
|
||||
@@ -23,16 +23,17 @@
|
||||
*/
|
||||
|
||||
global $RBAC;
|
||||
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
$resultRbac = $RBAC->requirePermissions('PM_SETUP_ADVANCE', 'PM_SETUP_LOGS');
|
||||
if (!$resultRbac) {
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
}
|
||||
|
||||
G::LoadClass( 'configuration' );
|
||||
G::LoadClass('configuration');
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( 'eventList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||
$configPage = $c->getConfiguration('eventList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_SUB_MENU = 'logs';
|
||||
@@ -40,46 +41,45 @@ $G_ID_MENU_SELECTED = 'logs';
|
||||
$G_ID_SUB_MENU_SELECTED = 'EMAILS';
|
||||
|
||||
//get values for the comboBoxes
|
||||
$userUid = (isset( $_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||
$status = array (
|
||||
array ('',G::LoadTranslation( 'ID_ALL' )),
|
||||
array ("sent", G::LoadTranslation( 'ID_SENT' )),
|
||||
array ("pending", G::LoadTranslation( 'ID_PENDING' ))
|
||||
$userUid = (isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||
$status = array(
|
||||
array('', G::LoadTranslation('ID_ALL')),
|
||||
array("sent", G::LoadTranslation('ID_SENT')),
|
||||
array("pending", G::LoadTranslation('ID_PENDING'))
|
||||
);
|
||||
|
||||
$processes = getProcessArray( $userUid );
|
||||
$processes = getProcessArray($userUid);
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'mails/emailList', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'mails/emailList' ); //adding a html file .html.
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('mails/emailList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('mails/emailList'); //adding a html file .html.
|
||||
//sending the columns to display in grid
|
||||
$oHeadPublisher->assign( 'statusValues', $status );
|
||||
$oHeadPublisher->assign( 'processValues', $processes );
|
||||
$oHeadPublisher->assign('statusValues', $status);
|
||||
$oHeadPublisher->assign('processValues', $processes);
|
||||
|
||||
function getProcessArray ($userUid)
|
||||
{
|
||||
function getProcessArray($userUid) {
|
||||
global $oAppCache;
|
||||
require_once ("classes/model/AppCacheView.php");
|
||||
require_once("classes/model/AppCacheView.php");
|
||||
|
||||
$processes = Array ();
|
||||
$processes[] = array ('',G::LoadTranslation( 'ID_ALL_PROCESS' ));
|
||||
$processes = array();
|
||||
$processes[] = array('', G::LoadTranslation('ID_ALL_PROCESS'));
|
||||
|
||||
$cProcess = new Criteria( 'workflow' );
|
||||
$cProcess = new Criteria('workflow');
|
||||
$cProcess->clearSelectColumns();
|
||||
$cProcess->addSelectColumn( AppCacheViewPeer::PRO_UID );
|
||||
$cProcess->addSelectColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||
$cProcess->setDistinct( AppCacheViewPeer::PRO_UID );
|
||||
$cProcess->addSelectColumn(AppCacheViewPeer::PRO_UID);
|
||||
$cProcess->addSelectColumn(AppCacheViewPeer::APP_PRO_TITLE);
|
||||
$cProcess->setDistinct(AppCacheViewPeer::PRO_UID);
|
||||
|
||||
$cProcess->addAscendingOrderByColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||
$cProcess->addAscendingOrderByColumn(AppCacheViewPeer::APP_PRO_TITLE);
|
||||
|
||||
$oDataset = AppCacheViewPeer::doSelectRS( $cProcess );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset = AppCacheViewPeer::doSelectRS($cProcess);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$processes[] = array ($aRow['PRO_UID'],$aRow['APP_PRO_TITLE']);
|
||||
$processes[] = array($aRow['PRO_UID'], $aRow['APP_PRO_TITLE']);
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,21 +21,26 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
$RBAC_Response = $RBAC->requirePermissions('PM_USERS');
|
||||
if (!$RBAC_Response) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
global $RBAC;
|
||||
switch ($RBAC->userCanAccess( 'PM_USERS' )) {
|
||||
case - 2:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
$access = $RBAC->userCanAccess('PM_USERS');
|
||||
switch ($access !== 1) {
|
||||
case -2:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
case - 1:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
case -1:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
case - 3:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
case -3:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
}
|
||||
@@ -47,17 +52,17 @@ $G_ID_SUB_MENU_SELECTED = 'ROLES';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
G::LoadClass( 'configuration' );
|
||||
G::LoadClass('configuration');
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( 'rolesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||
$configPage = $c->getConfiguration('rolesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'roles/rolesList', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'roles/rolesList' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'PARTNER_FLAG', (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false);
|
||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||
$oHeadPublisher->assign( 'CONFIG', $Config );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
$oHeadPublisher->addExtJsScript('roles/rolesList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('roles/rolesList'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('PARTNER_FLAG', (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false);
|
||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
||||
$oHeadPublisher->assign('CONFIG', $Config);
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
|
||||
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE', 'PM_SETUP_LANGUAGE');
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'setup/languages', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'setup/languages' ); //adding a html file .html.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_SETUP' );
|
||||
$RBAC->requirePermissions( 'PM_SETUP', 'PM_SETUP_HEART_BEAT');
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
G::LoadClass( 'serverConfiguration' );
|
||||
|
||||
@@ -21,26 +21,27 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1)
|
||||
$RBAC_Response = $RBAC->requirePermissions('PM_USERS');
|
||||
if (!$RBAC_Response)
|
||||
return $RBAC_Response;
|
||||
global $RBAC;
|
||||
|
||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||
$access = $RBAC->userCanAccess('PM_USERS');
|
||||
if ($access != 1) {
|
||||
switch ($access) {
|
||||
case - 1:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
case -1:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
case - 2:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
case -2:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
default:
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
break;
|
||||
}
|
||||
@@ -53,16 +54,16 @@ $G_ID_SUB_MENU_SELECTED = 'USERS';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
G::LoadClass( 'configuration' );
|
||||
G::LoadClass('configuration');
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( 'usersList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||
$configPage = $c->getConfiguration('usersList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'users/usersList', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'users/usersList' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'CONFIG', $Config );
|
||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('users/usersList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('users/usersList'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('CONFIG', $Config);
|
||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user