Merged in bugfix/PMCORE-3393 (pull request #8213)

PMCORE-3393

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Andrea Adamczyk
2021-10-12 18:44:44 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 11 additions and 4 deletions

View File

@@ -44,8 +44,8 @@ class newSiteProxy extends HttpProxyController
//$json = new Services_JSON();
//G::pr($result['result']['database']);G::pr($action);
$dbWf = $result['result']['database']['ao']['ao_db_wf']['status'];
$dbRb = $result['result']['database']['ao']['ao_db_rb']['status'];
$dbRp = $result['result']['database']['ao']['ao_db_rp']['status'];
$dbRb = isset($result['result']['database']['ao']['ao_db_rb']['status']) ? $result['result']['database']['ao']['ao_db_rb']['status'] : null;
$dbRp = isset($result['result']['database']['ao']['ao_db_rp']['status']) ? $result['result']['database']['ao']['ao_db_rp']['status'] : null;
$wsAction = ($action != '') ? 1 : 0;
if ($dbWf && $action) {
$this->success = true;

View File

@@ -172,7 +172,10 @@ class Installer
if ($this->cc_status == 1) {
$host = ($islocal) ? "localhost" : "%";
$this->run_query("GRANT ALL PRIVILEGES ON `$wf`.* TO {$this->wf_user_db}@'$host' IDENTIFIED BY '{$this->options['password']}' WITH GRANT OPTION", "Grant privileges for user {$this->wf_user_db} on database $wf", self::CONNECTION_TEST_INSTALL);
$query = "CREATE USER '{$this->wf_user_db}'@'$host' IDENTIFIED WITH mysql_native_password BY '{$this->options['password']}'";
$this->run_query($query, "Create user {$this->wf_user_db} for database $wf", self::CONNECTION_TEST_INSTALL);
$query = "GRANT ALL PRIVILEGES ON `$wf`.* TO '{$this->wf_user_db}'@'$host' WITH GRANT OPTION";
$this->run_query($query, "Grant privileges for user {$this->wf_user_db} on database $wf", self::CONNECTION_TEST_INSTALL);
}
@@ -810,7 +813,11 @@ class Installer
$rt['message'] = 'Successful connection';
} else {
$usrTest = 'wfrbtest';
$chkG = "GRANT ALL PRIVILEGES ON `" . $dbNameTest . "`.* TO " . $usrTest . "@'%' IDENTIFIED BY '!Sample123' WITH GRANT OPTION";
$chkG = "CREATE USER '$usrTest'@'%' IDENTIFIED WITH mysql_native_password BY '!Sample123'";
DB::connection($nameConnection)
->statement($chkG);
$chkG = "GRANT ALL PRIVILEGES ON `$dbNameTest`.* TO '$usrTest'@'%' WITH GRANT OPTION";
$ch = DB::connection($nameConnection)
->statement($chkG);