mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Wizard: Ensure that privileges are checked only once
Another entry in the "The provided credentials cannot be used to create the database and/or the user" story...
This commit is contained in:
parent
923bc11b39
commit
d02c078e4a
@ -158,7 +158,7 @@ class WebWizard extends Wizard implements SetupWizard
|
||||
}
|
||||
} elseif ($page->getName() === 'setup_database_creation') {
|
||||
$page->setDatabaseSetupPrivileges(
|
||||
array_merge($this->databaseCreationPrivileges, $this->databaseSetupPrivileges)
|
||||
array_unique(array_merge($this->databaseCreationPrivileges, $this->databaseSetupPrivileges))
|
||||
);
|
||||
$page->setDatabaseUsagePrivileges($this->databaseUsagePrivileges);
|
||||
$page->setResourceConfig($this->getPageData('setup_db_resource'));
|
||||
@ -236,7 +236,9 @@ class WebWizard extends Wizard implements SetupWizard
|
||||
// It is not possible to reliably determine whether a database exists or not if a user can't
|
||||
// log in to the database, so we just require the user to be able to create the database
|
||||
$skip = $db->checkPrivileges(
|
||||
array_merge($this->databaseCreationPrivileges, $this->databaseSetupPrivileges),
|
||||
array_unique(
|
||||
array_merge($this->databaseCreationPrivileges, $this->databaseSetupPrivileges)
|
||||
),
|
||||
$this->databaseTables
|
||||
);
|
||||
} catch (PDOException $_) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user