fix: live query role cache does not clear when a user is added to a role (#8026)

This commit is contained in:
dblythy
2022-06-11 18:21:55 +10:00
committed by GitHub
parent 0cd902b8c2
commit 199dfc1722
6 changed files with 108 additions and 2 deletions

View File

@@ -1326,6 +1326,9 @@ RestWrite.prototype.runDatabaseOperation = function () {
if (this.className === '_Role') {
this.config.cacheController.role.clear();
if (this.config.liveQueryController) {
this.config.liveQueryController.clearCachedRoles(this.auth.user);
}
}
if (this.className === '_User' && this.query && this.auth.isUnauthenticated()) {