mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(NewUserDialog): allow to deselect a group from the list
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
parent
1a99477b4f
commit
ed4e7c781c
1 changed files with 13 additions and 0 deletions
|
|
@ -83,6 +83,7 @@
|
|||
:create-option="(value) => ({ id: value, name: value, isCreating: true })"
|
||||
@search="searchGroups"
|
||||
@option:created="createGroup"
|
||||
@option:deselected="removeGroup"
|
||||
@option:selected="options => addGroup(options.at(-1))" />
|
||||
<!-- If user is not admin, they are a subadmin.
|
||||
Subadmins can't create users outside their groups
|
||||
|
|
@ -348,6 +349,18 @@ export default {
|
|||
this.newUser.groups.push(group)
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove user from group
|
||||
*
|
||||
* @param {object} group Group object
|
||||
*/
|
||||
removeGroup(group) {
|
||||
if (group.canRemove === false) {
|
||||
return
|
||||
}
|
||||
this.newUser.groups = this.newUser.groups.filter((g) => g.id !== group.id)
|
||||
},
|
||||
|
||||
/**
|
||||
* Validate quota string to make sure it's a valid human file size
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue