fix: live query role cache does not clear when a user is added to a role (#8026)
This commit is contained in:
@@ -230,6 +230,15 @@ Auth.prototype.cacheRoles = function () {
|
||||
return true;
|
||||
};
|
||||
|
||||
Auth.prototype.clearRoleCache = function (sessionToken) {
|
||||
if (!this.cacheController) {
|
||||
return false;
|
||||
}
|
||||
this.cacheController.role.del(this.user.id);
|
||||
this.cacheController.user.del(sessionToken);
|
||||
return true;
|
||||
};
|
||||
|
||||
Auth.prototype.getRolesByIds = async function (ins) {
|
||||
const results = [];
|
||||
// Build an OR query across all parentRoles
|
||||
|
||||
Reference in New Issue
Block a user