File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
apps/settings/src/components/Users Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 8383 :create-option =" (value) => ({ id: value, name: value, isCreating: true })"
8484 @search =" searchGroups"
8585 @option:created =" createGroup"
86+ @option:deselected =" removeGroup"
8687 @option:selected =" options => addGroup(options.at(-1))" />
8788 <!-- If user is not admin, they are a subadmin.
8889 Subadmins can't create users outside their groups
@@ -348,6 +349,18 @@ export default {
348349 this .newUser .groups .push (group)
349350 },
350351
352+ /**
353+ * Remove user from group
354+ *
355+ * @param {object} group Group object
356+ */
357+ removeGroup (group ) {
358+ if (group .canRemove === false ) {
359+ return
360+ }
361+ this .newUser .groups = this .newUser .groups .filter ((g ) => g .id !== group .id )
362+ },
363+
351364 /**
352365 * Validate quota string to make sure it's a valid human file size
353366 *
You can’t perform that action at this time.
0 commit comments