There was an error while loading. Please reload this page.
1 parent d3227ef commit 4b98181Copy full SHA for 4b98181
src/rbac/user.rs
@@ -317,14 +317,13 @@ impl UserGroup {
317
if users.is_empty() {
318
return Ok(());
319
}
320
- let old_users = &self.users;
321
let new_users = HashSet::from_iter(self.users.difference(&users).cloned());
322
-
323
- if old_users.eq(&new_users) {
+ let removed_users: HashSet<String> = self.users.intersection(&users).cloned().collect();
+ if removed_users.is_empty() {
324
325
326
// also refresh all user sessions
327
- for username in &users {
+ for username in &removed_users {
328
mut_sessions().remove_user(username);
329
330
self.users.clone_from(&new_users);
0 commit comments