Merge remote-tracking branch 'origin/feature/HOR-3559' into feature/HOR-3629

This commit is contained in:
Ronald Quenta
2017-08-10 18:33:14 -04:00
68 changed files with 818 additions and 760 deletions

View File

@@ -1503,7 +1503,7 @@ function get_infoOnPM($workspace) {
$dbNetView = new NET(DB_HOST);
$dbNetView->loginDbServer(DB_USER, DB_PASS);
$dbConns = new dbConnections('');
$dbConns = new DbConnections('');
$availdb = '';
foreach( $dbConns->getDbServicesAvailables() as $key => $val ) {
if( $availdb != '' )

View File

@@ -27,7 +27,6 @@
$xmlfile = '{className}/{className}OnTransitList';
/* Render page */
//require_once ( 'classes/class.extendGulliver.php' );
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent( 'propeltable', '{className}/paged-table', '{className}/{className}OnTransitList', $Criteria );
G::RenderPage( "publish" );

View File

@@ -14,6 +14,27 @@ class Bootstrap
//below here only approved methods
/**
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function autoloadClass($class)
{
}
/**
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function registerClass($className, $includePath)
{
}
/**
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function registerDir($name, $dir)
{
}
/*
* these functions still under revision
*/
@@ -22,6 +43,12 @@ class Bootstrap
{
return PmSystem::getSystemConfiguration($globalIniFile, $wsIniFile, $wsName);
}
/**
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function registerSystemClasses()
{
}
//below this line, still not approved methods
@@ -122,6 +149,13 @@ class Bootstrap
$smarty->display($template);
}
/**
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function LoadSystem($strClass)
{
}
/**
* Get the temporal directory path on differents O.S.
* i.e. /temp -> linux, C:/Temp -> win
@@ -411,6 +445,19 @@ class Bootstrap
return $content;
}
/**
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function LoadClass($strClass)
{
}
/**
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function LoadThirdParty($sPath, $sFile)
{
}
/**
* Function LoadTranslationObject
@@ -1948,6 +1995,13 @@ class Bootstrap
return $result;
}
/**
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public function getModel($model)
{
}
/**
* Create an encrypted unique identifier based on $id and the selected scope id.
*
@@ -2427,6 +2481,13 @@ class Bootstrap
return strtoupper(PHP_OS) == "LINUX";
}
/**
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function initVendors()
{
}
public static function parseIniFile($filename)
{
$data = @parse_ini_file($filename, true);
@@ -2516,18 +2577,37 @@ class Bootstrap
return $var;
}
public function verifyHashPassword ($pass, $userPass)
/**
* Verify Hash password with password entered
*
* @param string $pass password
* @param string $userPass hash of password
* @return bool true or false
*/
public function verifyHashPassword($pass, $userPass)
{
global $RBAC;
$passwordHashConfig = Bootstrap::getPasswordHashConfig();
$hashTypeCurrent = $passwordHashConfig['current'];
$hashTypePrevious = $passwordHashConfig['previous'];
if ((Bootstrap::hashPassword($pass, $hashTypeCurrent) == $userPass) || ($pass === $hashTypeCurrent . ':' . $userPass)) {
return true;
$acceptance = false;
if ($RBAC->loginWithHash()) {
//To enable compatibility with soap login
if ((Bootstrap::hashPassword($pass, $hashTypeCurrent) == $userPass) || ($pass === $hashTypeCurrent . ':' . $userPass)) {
$acceptance = true;
} else if ((Bootstrap::hashPassword($pass, $hashTypePrevious) == $userPass) || ($pass === $hashTypePrevious . ':' . $userPass)) {
$acceptance = true;
}
} else {
if (Bootstrap::hashPassword($pass, $hashTypeCurrent) == $userPass) {
$acceptance = true;
} else if (Bootstrap::hashPassword($pass, $hashTypePrevious) == $userPass) {
$acceptance = true;
}
}
if ((Bootstrap::hashPassword($pass, $hashTypePrevious) == $userPass) || ($pass === $hashTypePrevious . ':' . $userPass)) {
return true;
}
return false;
return $acceptance;
}
/**

View File

@@ -31,7 +31,7 @@
* @description This class is a Dynaform handler for modify directly into file
* @package gulliver.system
*/
class dynaFormHandler
class DynaformHandler
{
private $xmlfile;

View File

@@ -46,11 +46,7 @@ class G
public static $httpHost;
/**
* Load Gulliver Classes
* @access public
* @param string $strClass
* @return void
* @deprecated 08-04-2017
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function LoadSystem($strClass)
{
@@ -58,11 +54,7 @@ class G
}
/**
* Load System Classes
* @access public
* @param string $strClass
* @return void
* @deprecated 08-04-2017
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public function LoadSystemExist($strClass)
{
@@ -70,11 +62,7 @@ class G
}
/**
* Include javascript files
* @access public
* @param string $strClass
* @return void
* @deprecated 08-04-2017
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public function LoadInclude($strClass)
{
@@ -82,11 +70,7 @@ class G
}
/**
* public function LoadClassRBAC
* @access public
* @param string $strClass
* @return void
* @deprecated 08-04-2017
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public function LoadClassRBAC($strClass)
{
@@ -94,12 +78,7 @@ class G
}
/**
* If the class is not defined by the aplication, it
* attempt to load the class from gulliver.system
* @access public
* @param string $strClass
* @return void
* @deprecated 08-04-2017
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function LoadClass($strClass)
{
@@ -107,12 +86,7 @@ class G
}
/**
* public function LoadThirdParty
* @access public
* @param string $sPath
* @param string $sFile
* @return void
* @deprecated 08-04-2017
* @deprecated 3.2.2, We keep this function only for backwards compatibility because is used in the plugin manager
*/
public static function LoadThirdParty($sPath, $sFile)
{

View File

@@ -75,6 +75,12 @@ class RBAC
private static $instance = null;
public $authorizedActions = array();
/**
* To enable compatibility with soap login.
* @var bool
*/
private $enableLoginHash = false;
public function __construct ()
{
$this->authorizedActions = array(
@@ -1572,5 +1578,31 @@ class RBAC
throw new RBACException('ID_ACCESS_DENIED', 403);
}
}
/**
* Enable compatibility with hash login
*/
public function enableLoginWithHash()
{
$this->enableLoginHash = true;
}
/**
* Disable compatibility with hash login
*/
public function disableLoginWithHash()
{
$this->enableLoginHash = false;
}
/**
* Return status login with hash
*
* @return bool
*/
public function loginWithHash()
{
return $this->enableLoginHash;
}
}