PM-2835 "Adicionar los siguientes features..." SOLVED

Issue:
    Adicionar los siguientes features la posibilidad de seleccionarse en la licencia (features):
    - Code Scanner
    - Multiple Email Servers
    - Mobile Fields
Cause:
    Nueva validacion de licencia para features
Solution:
    - Se agrego validacion de licencia para los features especificados
    - Se completo el "Code Scanner" para procesos BPMN (import and triggers)
Note:
    QA debera hacer pruebas en procesos pm y pmx
This commit is contained in:
Victor Saisa Lopez
2015-06-05 15:44:28 -04:00
parent 788487f524
commit 617198ef17
7 changed files with 83 additions and 16 deletions

View File

@@ -181,6 +181,31 @@ class Trigger
}
}
/*----------------------------------********---------------------------------*/
if (\PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=") &&
isset($dataTrigger["TRI_WEBBOT"])
) {
//Check disabled code
\G::LoadClass("codeScanner");
$arraySystemConfiguration = \System::getSystemConfiguration(PATH_CONFIG . "env.ini");
$cs = new \CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
$arrayFoundDisabledCode = $cs->checkDisabledCode("SOURCE", $dataTrigger["TRI_WEBBOT"]);
if (!empty($arrayFoundDisabledCode)) {
$strCodeAndLine = "";
foreach ($arrayFoundDisabledCode["source"] as $key => $value) {
$strCodeAndLine .= (($strCodeAndLine != "")? ", " : "") . \G::LoadTranslation("ID_DISABLED_CODE_CODE_AND_LINE", array($key, implode(", ", $value)));
}
throw new \Exception(\G::LoadTranslation("ID_DISABLED_CODE_TRIGGER", array($strCodeAndLine)));
}
}
/*----------------------------------********---------------------------------*/
$dataTrigger['PRO_UID'] = $sProcessUID;
$oTrigger = new \Triggers();
if ($create) {

View File

@@ -27,7 +27,7 @@ abstract class Importer
const IMPORT_STAT_INVALID_SOURCE_FILE = 102; //Error, Invalid file type or the file have corrupt data.
const IMPORT_STAT_GROUP_ALREADY_EXISTS = 105; //Error, Group already exists.
public abstract function load();
public abstract function load($filename = null);
/**
* Verify if exists reserved words SQL

View File

@@ -24,9 +24,13 @@ class XmlImporter extends Importer
* )
* @throws \Exception
*/
public function load()
public function load($filename = null)
{
$this->dom->load($this->filename);
if (!is_null($filename) && !file_exists($filename)) {
throw new \Exception(\G::LoadTranslation("ID_INVALID_FILE"));
}
$this->dom->load((is_null($filename))? $this->filename : $filename);
$this->root = $this->dom->documentElement;
// validate version