Relax database permission checks in the setup wizard
The wizard considered all permissions being exclusively associated to their most important context, which is, in the most common case, incorrect. Permissions assigned on database level do not need to be assigned on table level as well. refs #8267
This commit is contained in:
parent
917e5b81ba
commit
45408e45af
|
@ -641,7 +641,8 @@ EOD;
|
|||
foreach ($mysqlPrivileges as $privilege) {
|
||||
if (false === empty($context) && $this->mysqlGrantContexts[$privilege] & static::TABLE_LEVEL) {
|
||||
$tablePrivileges[] = $privilege;
|
||||
} elseif ($this->mysqlGrantContexts[$privilege] & static::DATABASE_LEVEL) {
|
||||
}
|
||||
if ($this->mysqlGrantContexts[$privilege] & static::DATABASE_LEVEL) {
|
||||
$dbPrivileges[] = $privilege;
|
||||
}
|
||||
}
|
||||
|
@ -661,7 +662,11 @@ EOD;
|
|||
}
|
||||
|
||||
$tablePrivilegesGranted = true;
|
||||
if (false === empty($tablePrivileges)) {
|
||||
if (
|
||||
false === empty($tablePrivileges) && (
|
||||
!$dbPrivilegesGranted || array_intersect($dbPrivileges, $tablePrivileges) != $tablePrivileges
|
||||
)
|
||||
) {
|
||||
$tableCondition = 'table_name IN (' . join(',', array_map(array($this, 'quote'), $context)) . ')';
|
||||
$query = $this->query(
|
||||
'SELECT COUNT(*) as matches'
|
||||
|
|
Loading…
Reference in New Issue