BUG_14693 Some functionalities inside the BPMN designer are not working.
I move the Insert of the Oauth client id to the install class. This apply in the installation and in the creation of a new workspace.
This commit is contained in:
@@ -165,6 +165,25 @@ class Installer
|
|||||||
$qwv = $this->query_sql_file(PATH_WORKFLOW_MYSQL_DATA . $values, $this->connection_database);
|
$qwv = $this->query_sql_file(PATH_WORKFLOW_MYSQL_DATA . $values, $this->connection_database);
|
||||||
$this->log($qwv, isset($qwv['errors']));
|
$this->log($qwv, isset($qwv['errors']));
|
||||||
|
|
||||||
|
$http = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
|
||||||
|
$lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
|
||||||
|
$host = $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '');
|
||||||
|
$workspace = $this->options['name'];
|
||||||
|
|
||||||
|
$endpoint = sprintf(
|
||||||
|
'%s://%s/sys%s/%s/%s/oauth2/grant',
|
||||||
|
$http,
|
||||||
|
$host,
|
||||||
|
$workspace,
|
||||||
|
$lang,
|
||||||
|
SYS_SKIN
|
||||||
|
);
|
||||||
|
|
||||||
|
// inserting the outh_client
|
||||||
|
$query = ( "INSERT INTO OAUTH_CLIENTS (CLIENT_ID,CLIENT_SECRET,CLIENT_NAME,CLIENT_DESCRIPTION,CLIENT_WEBSITE,REDIRECT_URI,USR_UID ) VALUES
|
||||||
|
('x-pm-local-client','179ad45c6ce2cb97cf1029e212046e81','PM Web Designer','ProcessMaker Web Designer App','www.processmaker.com','" . $endpoint . "','00000000000000000000000000000001' )");
|
||||||
|
$this->run_query( $query );
|
||||||
|
|
||||||
/* Dump schema rbac && data */
|
/* Dump schema rbac && data */
|
||||||
$pws = PATH_RBAC_MYSQL_DATA . $schema;
|
$pws = PATH_RBAC_MYSQL_DATA . $schema;
|
||||||
mysql_select_db($rb, $this->connection_database);
|
mysql_select_db($rb, $this->connection_database);
|
||||||
|
|||||||
@@ -168,32 +168,6 @@ try {
|
|||||||
$oServerConf =& serverConf::getSingleton();
|
$oServerConf =& serverConf::getSingleton();
|
||||||
$oServerConf->sucessfulLogin();
|
$oServerConf->sucessfulLogin();
|
||||||
|
|
||||||
//
|
|
||||||
if (!(OauthClients::exists('x-pm-local-client'))) {
|
|
||||||
$http = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
|
|
||||||
$lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
|
|
||||||
$host = $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '');
|
|
||||||
|
|
||||||
$endpoint = sprintf(
|
|
||||||
'%s://%s/sys%s/%s/%s/oauth2/grant',
|
|
||||||
$http,
|
|
||||||
$host,
|
|
||||||
SYS_SYS,
|
|
||||||
$lang,
|
|
||||||
SYS_SKIN
|
|
||||||
);
|
|
||||||
|
|
||||||
$oauthClients = new OauthClients();
|
|
||||||
$oauthClients->setClientId('x-pm-local-client');
|
|
||||||
$oauthClients->setClientSecret('179ad45c6ce2cb97cf1029e212046e81');
|
|
||||||
$oauthClients->setClientName('PM Web Designer');
|
|
||||||
$oauthClients->setClientDescription('ProcessMaker Web Designer App');
|
|
||||||
$oauthClients->setClientWebsite('www.processmaker.com');
|
|
||||||
$oauthClients->setRedirectUri($endpoint);
|
|
||||||
$oauthClients->setUsrUid("00000000000000000000000000000001");
|
|
||||||
$oauthClients->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Assign the uid of user to userloggedobj
|
// Assign the uid of user to userloggedobj
|
||||||
$RBAC->loadUserRolePermission($RBAC->sSystem, $uid);
|
$RBAC->loadUserRolePermission($RBAC->sSystem, $uid);
|
||||||
$res = $RBAC->userCanAccess('PM_LOGIN');
|
$res = $RBAC->userCanAccess('PM_LOGIN');
|
||||||
|
|||||||
Reference in New Issue
Block a user