fix for SQLForm database table permissions where the user is granted permission on all databases
This commit is contained in:
parent
7329f102bd
commit
c410bfd146
2 changed files with 5 additions and 2 deletions
|
|
@ -656,12 +656,13 @@ sub _databaseLinkHasPrivileges {
|
|||
@grants = $dbLink->db->buildArray('show grants for current_user');
|
||||
|
||||
foreach (@grants) {
|
||||
if (m/GRANT ([\w\s\d,]*?) ON .$databaseName.*$/) {
|
||||
##Checks for grants on all databases '*' or grants on a specific database
|
||||
if (m/GRANT ([\w\s\d,]*?) ON (?:\*|.$databaseName.)\./) {
|
||||
push(@privileges, (split(/, /,$1)));
|
||||
}
|
||||
}
|
||||
|
||||
# Check ik all required privs are present.
|
||||
# Check if all required privs are present.
|
||||
return 1 if (isIn('ALL PRIVILEGES', @privileges));
|
||||
|
||||
foreach (@$wantedPrivileges) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue