From 3e11033be365f47406b76f2ee5700ae1fd1861fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20Cesar=20Laura=20Avenda=C3=B1o?= Date: Fri, 24 Jul 2020 15:35:12 +0000 Subject: [PATCH] PMCORE-1930 --- workflow/engine/config/databases.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/workflow/engine/config/databases.php b/workflow/engine/config/databases.php index fc3583505..0833eec0f 100644 --- a/workflow/engine/config/databases.php +++ b/workflow/engine/config/databases.php @@ -64,6 +64,7 @@ if (defined('PATH_DB') && !empty(config("system.workspace"))) { $pro ['datasources']['rp']['connection'] = $dsnReport; $pro ['datasources']['rp']['adapter'] = DB_ADAPTER; + // "workflow" connection $dbHost = explode(':', DB_HOST); config(['database.connections.workflow.host' => $dbHost[0]]); config(['database.connections.workflow.database' => DB_NAME]); @@ -72,6 +73,28 @@ if (defined('PATH_DB') && !empty(config("system.workspace"))) { if (count($dbHost) > 1) { config(['database.connections.workflow.port' => $dbHost[1]]); } + + // "rbac" connection + $dbRbacHost = explode(':', DB_RBAC_HOST); + config(['database.connections.rbac.driver' => DB_ADAPTER]); + config(['database.connections.rbac.host' => $dbRbacHost[0]]); + config(['database.connections.rbac.database' => DB_RBAC_NAME]); + config(['database.connections.rbac.username' => DB_RBAC_USER]); + config(['database.connections.rbac.password' => DB_RBAC_PASS]); + if (count($dbRbacHost) > 1) { + config(['database.connections.rbac.port' => $dbRbacHost[1]]); + } + + // "report" connection + $dbReportHost = explode(':', DB_REPORT_HOST); + config(['database.connections.report.driver' => DB_ADAPTER]); + config(['database.connections.report.host' => $dbReportHost[0]]); + config(['database.connections.report.database' => DB_REPORT_NAME]); + config(['database.connections.report.username' => DB_REPORT_USER]); + config(['database.connections.report.password' => DB_REPORT_PASS]); + if (count($dbReportHost) > 1) { + config(['database.connections.report.port' => $dbReportHost[1]]); + } } $pro ['datasources']['dbarray']['connection'] = 'dbarray://user:pass@localhost/pm_os';