bug #1721571 CREATE database privilege not always detected

This commit is contained in:
Marc Delisle
2007-05-19 18:08:38 +00:00
parent d16da0e73c
commit 646d6c0875
2 changed files with 7 additions and 1 deletions

View File

@@ -28,7 +28,11 @@ function PMA_analyseShowGrant($rs_usr, &$is_create_db_priv, &$db_to_create, &$is
if ($show_grants_str == 'RELOAD') {
$is_reload_priv = true;
}
if (($show_grants_str == 'ALL') || ($show_grants_str == 'ALL PRIVILEGES') || ($show_grants_str == 'CREATE') || strpos($show_grants_str, 'CREATE')) {
/**
* @todo if we find CREATE VIEW but not CREATE, do not offer
* the create database dialog box
*/
if (($show_grants_str == 'ALL') || ($show_grants_str == 'ALL PRIVILEGES') || ($show_grants_str == 'CREATE') || strpos($show_grants_str, 'CREATE,') !== false) {
if ($show_grants_dbname == '*') {
// a global CREATE privilege
$is_create_db_priv = true;