correctly add user-wide mysql-user when creating user with mysql-resources (accesst to all databases starting with the loginname)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -770,7 +770,7 @@ class Customers extends ApiCommand implements ResourceEntity
|
|||||||
$dbm = new DbManager($this->logger());
|
$dbm = new DbManager($this->logger());
|
||||||
// give permission to the user on every access-host we have
|
// give permission to the user on every access-host we have
|
||||||
foreach (array_map('trim', explode(',', Settings::Get('system.mysql_access_host'))) as $mysql_access_host) {
|
foreach (array_map('trim', explode(',', Settings::Get('system.mysql_access_host'))) as $mysql_access_host) {
|
||||||
$dbm->getManager()->grantPrivilegesTo($loginname, $password, $mysql_access_host, false, false);
|
$dbm->getManager()->grantPrivilegesTo($loginname, $password, $mysql_access_host, false, false, true);
|
||||||
}
|
}
|
||||||
$dbm->getManager()->flushPrivileges();
|
$dbm->getManager()->flushPrivileges();
|
||||||
Database::needRoot(false);
|
Database::needRoot(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user