Skip to content

Commit

Permalink
Wizard: Ensure that privileges are checked only once
Browse files Browse the repository at this point in the history
Another entry in the "The provided credentials cannot be
used to create the database and/or the user" story...
  • Loading branch information
Johannes Meyer committed Apr 15, 2015
1 parent 923bc11 commit d02c078
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/setup/library/Setup/WebWizard.php
Expand Up @@ -158,7 +158,7 @@ public function setupPage(Form $page, Request $request)
}
} 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'));
Expand Down Expand Up @@ -236,7 +236,9 @@ protected function getNewPage($requestedPage, Form $originPage)
// 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 $_) {
Expand Down

0 comments on commit d02c078

Please sign in to comment.