diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 5cbb2fa97..ee650555d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -15,6 +15,8 @@ - fix: Clear Login History period is calculated 24 times longer if it is set in months (thanks to Todor Kouyoumdjiev ECoCoMS Ltd.) http://www.plainblack.com/bugs/tracker/clear-login-history-period-is-calculated-24-times-longer-if-it-is-set-in-months#VomZpVCroSN6WoQ-UYo7Xw + - fix: SQLForm - cannot add new asset (revisited) (thanks to Joek Hondius) + http://www.plainblack.com/bugs/tracker/sqlform---cannot-add-new-asset-revisited#barqLwFe3LPODb4Mksc6ZA 7.3.13 - fix: Stale pages after user login diff --git a/lib/WebGUI/Asset/Wobject/SQLForm.pm b/lib/WebGUI/Asset/Wobject/SQLForm.pm index ef46db9f4..5de233bde 100644 --- a/lib/WebGUI/Asset/Wobject/SQLForm.pm +++ b/lib/WebGUI/Asset/Wobject/SQLForm.pm @@ -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) {