MySQL rolePrefix fix
gitea/hedera-web/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2022-02-10 12:37:12 +01:00
parent 8522097950
commit b2535c5d38
3 changed files with 4 additions and 4 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.407.57) stable; urgency=low
hedera-web (1.407.58) stable; urgency=low
* Initial Release.

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.407.57",
"version": "1.407.58",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

View File

@ -231,7 +231,7 @@ abstract class Service {
return $this->userDb;
$row = $this->db->getObject(
'SELECT r.name, rc.mysqlPassword, uc.loginKey
'SELECT r.name, rc.mysqlPassword, rc.rolePrefix, uc.loginKey
FROM account.user u
JOIN account.role r ON r.id = u.role
JOIN account.roleConfig rc ON TRUE
@ -240,7 +240,7 @@ abstract class Service {
[$user]
);
$userName = "z-{$row->name}";
$userName = "{$row->rolePrefix}{$row->name}";
$password = base64_decode($row->mysqlPassword);
$userDb = $this->app->createConnection($userName, $password, TRUE);