Skip to content

Commit

Permalink
feat(vue): Decrement Workspace Manager user count when removing a con…
Browse files Browse the repository at this point in the history
…nected group
  • Loading branch information
zak39 committed Nov 15, 2024
1 parent 93910b5 commit fb622ef
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/GroupDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ import NcActionInput from '@nextcloud/vue/dist/Components/NcActionInput.js'
import SelectUsers from './SelectUsers.vue'
import UserGroup from './services/Groups/UserGroup.js'
import UserTable from './UserTable.vue'
import ManagerGroup from './services/Groups/ManagerGroup.js'

export default {
name: 'GroupDetails',
Expand Down Expand Up @@ -165,6 +166,15 @@ export default {
})

Object.keys(space.users).forEach(key => {

if (space.users[key].groups.includes(ManagerGroup.getGid(space)) && space.users[key].groups.includes(gid)) {

Check failure on line 170 in src/GroupDetails.vue

View workflow job for this annotation

GitHub Actions / lint

Expected indentation of 4 tabs but found 8 spaces
console.debug('space.users[key]', space.users[key])

Check failure on line 171 in src/GroupDetails.vue

View workflow job for this annotation

GitHub Actions / lint

Expected indentation of 5 tabs but found 10 spaces
this.$store.dispatch('decrementGroupUserCount', {
spaceName: this.$route.params.space,
gid: ManagerGroup.getGid(space)
})
}

if (space.users[key].groups.includes(gid)) {
this.$store.commit('removeUserFromWorkspace', { name: space.name, user: space.users[key] })
}
Expand Down

0 comments on commit fb622ef

Please sign in to comment.