PM-399 Las funcionalidades del enterprise ya no tiene SOLVED
- A validation was added when use plugin.singleton.
This commit is contained in:
@@ -114,31 +114,13 @@ function change_hash($command, $opts)
|
||||
Bootstrap::LoadClass("plugin");
|
||||
foreach ($workspaces as $workspace) {
|
||||
CLI::logging("Checking workspace: ".pakeColor::colorize($workspace->name, "INFO")."\n");
|
||||
$path = PATH_DATA . 'sites' . PATH_SEP . $workspace->name . PATH_SEP;
|
||||
try {
|
||||
if (file_exists($path . 'plugin.singleton')) {
|
||||
define('SYS_SYS', $workspace->name);
|
||||
define('PATH_DATA_SITE', $path);
|
||||
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->setupPlugins();
|
||||
$oPluginRegistry->unSerializeInstance(file_get_contents($path . 'plugin.singleton'));
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->unSerializeInstance(file_get_contents($path . 'plugin.singleton'));
|
||||
|
||||
if ($oPluginRegistry->existsTrigger ( PM_HASH_PASSWORD )) {
|
||||
$response = new stdclass();
|
||||
$response->workspace = $workspace;
|
||||
$response->hash = $hash;
|
||||
$workspace->changeHashPassword($workspace->name, $response);
|
||||
$workspace->close();
|
||||
CLI::logging(pakeColor::colorize("Changed...", "ERROR") . "\n");
|
||||
} else {
|
||||
CLI::logging(pakeColor::colorize("You can't use the \"change-password-hash-method\" option because the license has expired or your workspace doesn't have the Enteprise plugin enabled.", "ERROR") . "\n");
|
||||
}
|
||||
} else {
|
||||
CLI::logging(pakeColor::colorize("You can't use the \"change-password-hash-method\" option because the license has expired or your workspace doesn't have the Enteprise plugin enabled.", "INFO") . "\n");
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo "> Error: ".CLI::error($e->getMessage()) . "\n";
|
||||
}
|
||||
|
||||
@@ -1162,7 +1162,7 @@ class PMPluginRegistry
|
||||
} else {
|
||||
$aux = explode( chr( 92 ), $detail->sFilename );
|
||||
}
|
||||
$sFilename = PATH_PLUGINS . $aux[count( $aux ) - 1];
|
||||
$sFilename = (($detail->sNamespace == 'enterprise') ? PATH_CORE. 'methods' . PATH_SEP . 'enterprise' . PATH_SEP : PATH_PLUGINS) . $aux[count( $aux ) - 1];
|
||||
if (! file_exists( $sFilename )) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1624,12 +1624,11 @@ class workspaceTools
|
||||
}
|
||||
}
|
||||
|
||||
public function changeHashPassword ($workspace,$response) {
|
||||
G::LoadClass("patch");
|
||||
public function changeHashPassword ($workspace, $response)
|
||||
{
|
||||
$this->initPropel( true );
|
||||
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->executeTriggers ( PM_HASH_PASSWORD , $response );
|
||||
G::LoadClass("enterprise");
|
||||
enterpriseClass::setHashPassword($response);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,15 +103,33 @@ if ($RBAC->userCanAccess("PM_SETUP") == 1) {
|
||||
//$G_TMP_MENU->AddIdRawOption("PHP_MAINTENANCE", "../admin/maintenance", 'Maintenance', "", "", "settings");
|
||||
}
|
||||
|
||||
|
||||
require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
|
||||
$enterprise = new enterprisePlugin('enterprise');
|
||||
|
||||
require_once 'classes/class.pmLicenseManager.php';
|
||||
if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) {
|
||||
$enterprise->install();
|
||||
require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
$enterprise = new enterprisePlugin('enterprise');
|
||||
$enterprise->enable();
|
||||
}
|
||||
$enterprise->setup();
|
||||
}
|
||||
$pmLicenseManagerO = &pmLicenseManager::getSingleton();
|
||||
$licenseStatusInfo = $pmLicenseManagerO->getCurrentLicenseStatus();
|
||||
$licStatusMsg = null;
|
||||
|
||||
if ((isset($pmLicenseManagerO->plan)) && ($pmLicenseManagerO->plan != "")) {
|
||||
$lines = explode(" - ", $pmLicenseManagerO->plan);
|
||||
if (isset($lines[0])) {
|
||||
$licStatusMsg .= "<br><i><small> " . $lines[0] . "</small></i>";
|
||||
}
|
||||
if ((isset($lines[1])) && ($lines[1] != $lines[0])) {
|
||||
$licStatusMsg .= "<br><i><small> " . $lines[1] . "</small></i>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($licenseStatusInfo["message"] != "") {
|
||||
$licStatusMsg = " <font color=\"red\">(" . $licenseStatusInfo["message"] . ")</font>";
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess("PM_SETUP") == 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_CASES_LIST'), "", "", "settings");
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class enterprisePlugin extends PMPlugin
|
||||
$this->sFriendlyName = "ProcessMaker Enterprise Edition";
|
||||
$this->sDescription = "ProcessMaker Enterprise Edition $VERSION";
|
||||
$this->sPluginFolder = "enterprise";
|
||||
$this->sSetupPage = "../enterprise/pluginsList.php";
|
||||
$this->sSetupPage = "../enterprise/addonsStore.php";
|
||||
$this->iVersion = $VERSION;
|
||||
$this->iPMVersion = "2.0.31";
|
||||
$this->aDependences = null;
|
||||
@@ -119,11 +119,12 @@ class enterprisePlugin extends PMPlugin
|
||||
|
||||
public function setup()
|
||||
{
|
||||
$this->registerMenu("setup", "menuEnterprise.php");
|
||||
////including the file inside the enterprise folder
|
||||
require_once PATH_CORE . 'classes' . PATH_SEP . 'class.pmLicenseManager.php';
|
||||
$this->registerTrigger(PM_LOGIN, "enterpriseSystemUpdate");
|
||||
$this->registerTrigger(PM_HASH_PASSWORD, 'setHashPassword');
|
||||
if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) {
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginDetail = $pluginRegistry->getPluginDetails("enterprise.php");
|
||||
$pluginRegistry->enablePlugin($pluginDetail->sNamespace);
|
||||
file_put_contents(PATH_DATA_SITE . "plugin.singleton", $pluginRegistry->serializeInstance());
|
||||
}
|
||||
}
|
||||
|
||||
public function enable()
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
global $G_TMP_MENU;
|
||||
|
||||
if (class_exists("pmLicenseManager")) {
|
||||
$pmLicenseManagerO = &pmLicenseManager::getSingleton();
|
||||
$licenseStatusInfo = $pmLicenseManagerO->getCurrentLicenseStatus();
|
||||
$licStatusMsg = null;
|
||||
|
||||
if ((isset($pmLicenseManagerO->plan)) && ($pmLicenseManagerO->plan != "")) {
|
||||
$lines = explode(" - ", $pmLicenseManagerO->plan);
|
||||
if (isset($lines[0])) {
|
||||
$licStatusMsg .= "<br><i><small> " . $lines[0] . "</small></i>";
|
||||
}
|
||||
if ((isset($lines[1])) && ($lines[1] != $lines[0])) {
|
||||
$licStatusMsg .= "<br><i><small> " . $lines[1] . "</small></i>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($licenseStatusInfo["message"] != "") {
|
||||
$licStatusMsg = " <font color=\"red\">(" . $licenseStatusInfo["message"] . ")</font>";
|
||||
}
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption("PMENTERPRISE", "../enterprise/addonsStore", G::LoadTranslation('ID_MENU_NAME') . $licStatusMsg, "", "", "plugins");
|
||||
|
||||
if (isset($pmLicenseManagerO->result) && ($pmLicenseManagerO->result == "OK")) {
|
||||
if (file_exists(PATH_HOME . "engine" . PATH_SEP . "methods" . PATH_SEP . "cases" . PATH_SEP . "casesListExtJs.php")) {
|
||||
$G_TMP_MENU->AddIdRawOption("CASES_LIST_SETUP", "../cases/casesListSetup", G::LoadTranslation('ID_CASES_LIST'), "", "", "settings");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,12 +42,11 @@ try {
|
||||
|
||||
require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php';
|
||||
|
||||
$enterprise = new enterprisePlugin('enterprise');
|
||||
|
||||
if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) {
|
||||
$enterprise = new enterprisePlugin('enterprise');
|
||||
$enterprise->enable();
|
||||
}
|
||||
$enterprise->setup();
|
||||
}
|
||||
$uid = $RBAC->VerifyLogin($usr , $pwd);
|
||||
$RBAC->cleanSessionFiles(72); //cleaning session files older than 72 hours
|
||||
|
||||
@@ -161,11 +160,13 @@ try {
|
||||
|
||||
//Execute the SSO Script from plugin
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
if ($oPluginRegistry->existsTrigger ( PM_LOGIN )) {
|
||||
$lSession="";
|
||||
$loginInfo = new loginInfo ($usr, $pwd, $lSession );
|
||||
if ($oPluginRegistry->existsTrigger ( PM_LOGIN )) {
|
||||
$oPluginRegistry->executeTriggers ( PM_LOGIN , $loginInfo );
|
||||
}
|
||||
G::LoadClass("enterprise");
|
||||
enterpriseClass::enterpriseSystemUpdate($loginInfo);
|
||||
$_SESSION['USER_LOGGED'] = $uid;
|
||||
$_SESSION['USR_USERNAME'] = $usr;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user