mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix(settings): Fix group creation when editing users
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
21dbef7c75
commit
91af8d1f64
1 changed files with 4 additions and 5 deletions
|
|
@ -749,18 +749,17 @@ export default {
|
|||
* @param {string} gid Group id
|
||||
*/
|
||||
async createGroup({ name: gid }) {
|
||||
this.loading = { groups: true, subadmins: true }
|
||||
this.loading.groups = true
|
||||
try {
|
||||
await this.$store.dispatch('addGroup', gid)
|
||||
this.availableGroups.push({ id: gid, name: gid })
|
||||
const userid = this.user.id
|
||||
await this.$store.dispatch('addUserGroup', { userid, gid })
|
||||
this.userGroups.push({ id: gid, name: gid })
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
this.loading = { groups: false, subadmins: false }
|
||||
logger.error(t('settings', 'Failed to create group'), { error })
|
||||
}
|
||||
return this.$store.getters.getGroups[this.groups.length]
|
||||
this.loading.groups = false
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue