Skip to content

Commit

Permalink
fix(user-management): Fix deleting user in hidden group(s)
Browse files Browse the repository at this point in the history
E.g. guest_users

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst committed Feb 7, 2023
1 parent 94983f6 commit 278e1f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/settings/src/store/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ const mutations = {
state.userCount-- // decrement Active Users count
user.groups.forEach(userGroup => {
const group = state.groups.find(groupSearch => groupSearch.id === userGroup)
if (!group) {
console.warn('User group ' + userGroup + ' does not exist during user removal')
return
}
group.usercount-- // decrement group total count
})
} else {
Expand Down

0 comments on commit 278e1f8

Please sign in to comment.