mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
MigrationManager: Also check table privileges
This commit is contained in:
parent
4a8d171aec
commit
9c6d930e17
@ -327,9 +327,16 @@ final class MigrationManager implements Countable
|
|||||||
$conn = $this->elevateDatabaseConnection($conn, $elevateConfig);
|
$conn = $this->elevateDatabaseConnection($conn, $elevateConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$wizardProperties = (new ReflectionClass(WebWizard::class))
|
||||||
|
->getDefaultProperties();
|
||||||
|
/** @var array<int, string> $tables */
|
||||||
|
$tables = $wizardProperties['databaseTables'];
|
||||||
|
|
||||||
$dbTool = $this->createDbTool($conn);
|
$dbTool = $this->createDbTool($conn);
|
||||||
$dbTool->connectToDb();
|
$dbTool->connectToDb();
|
||||||
if (! $dbTool->checkPrivileges($this->getRequiredDatabasePrivileges())) {
|
if (! $dbTool->checkPrivileges($this->getRequiredDatabasePrivileges())
|
||||||
|
&& ! $dbTool->checkPrivileges($this->getRequiredDatabasePrivileges(), $tables)
|
||||||
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user