fix in oauth in distinct workspace
This commit is contained in:
@@ -297,7 +297,9 @@ class WebApplication
|
|||||||
$port = empty($port) ? '' : ";port=$port";
|
$port = empty($port) ? '' : ";port=$port";
|
||||||
Services\OAuth2\Server::setDatabaseSource(DB_USER, DB_PASS, DB_ADAPTER.":host=$host;dbname=".DB_NAME.$port);
|
Services\OAuth2\Server::setDatabaseSource(DB_USER, DB_PASS, DB_ADAPTER.":host=$host;dbname=".DB_NAME.$port);
|
||||||
if (DB_NAME != DB_RBAC_NAME) { //it's PM < 3
|
if (DB_NAME != DB_RBAC_NAME) { //it's PM < 3
|
||||||
Services\OAuth2\Server::setDatabaseSourceRBAC(DB_RBAC_USER, DB_RBAC_PASS, DB_ADAPTER.":host=".DB_RBAC_HOST.";dbname=".DB_RBAC_NAME.$port);
|
list($host, $port) = strpos(DB_RBAC_HOST, ':') !== false ? explode(':', DB_RBAC_HOST) : array(DB_RBAC_HOST, '');
|
||||||
|
$port = empty($port) ? '' : ";port=$port";
|
||||||
|
Services\OAuth2\Server::setDatabaseSourceRBAC(DB_RBAC_USER, DB_RBAC_PASS, DB_ADAPTER.":host=$host;dbname=".DB_RBAC_NAME.$port);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setting default OAuth Client id, for local PM Web Designer
|
// Setting default OAuth Client id, for local PM Web Designer
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class Server implements iAuthenticate
|
|||||||
$cnn = array('dsn' => self::$dsn, 'username' => self::$dbUser, 'password' => self::$dbPassword);
|
$cnn = array('dsn' => self::$dsn, 'username' => self::$dbUser, 'password' => self::$dbPassword);
|
||||||
|
|
||||||
if (self::$isRBAC) {
|
if (self::$isRBAC) {
|
||||||
$config = array('user_table' => 'USERS');
|
$config = array();
|
||||||
$cnnrbac = array('dsn' => self::$dsnRBAC, 'username' => self::$dbUserRBAC, 'password' => self::$dbPasswordRBAC);
|
$cnnrbac = array('dsn' => self::$dsnRBAC, 'username' => self::$dbUserRBAC, 'password' => self::$dbPasswordRBAC);
|
||||||
$this->storage = new PmPdo($cnn, $config, $cnnrbac);
|
$this->storage = new PmPdo($cnn, $config, $cnnrbac);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user