File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -1091,12 +1091,7 @@ class SysPrivCache : public PermanentStorage
1091
1091
return false ;
1092
1092
1093
1093
MAP_DEBUG (fprintf (stderr, " granted=%d\n " , granted));
1094
-
1095
- // Note, roles have no special entry with empty string as a key.
1096
- // Thus, don't consider it as not populated if role to check is not set (empty).
1097
-
1098
- const string& roleInUse = granted ? *sqlRole : trusted_role;
1099
- return roleInUse.hasData () ? roles.getPrivileges (roleInUse, system_privileges) : true ;
1094
+ return roles.getPrivileges ((granted ? *sqlRole : trusted_role), system_privileges);
1100
1095
}
1101
1096
1102
1097
void populate (Mapping::DbHandle& iDb, const string& name, const string* sqlRole,
@@ -1128,7 +1123,7 @@ class SysPrivCache : public PermanentStorage
1128
1123
bool getPrivileges (const string& key, UserId::Privileges& system_privileges)
1129
1124
{
1130
1125
if (!key.hasData ())
1131
- return false ;
1126
+ return true ;
1132
1127
1133
1128
UserId::Privileges p;
1134
1129
if (!get (key, p))
You can’t perform that action at this time.
0 commit comments