diff options
author | Christopher Ng <chrng8@gmail.com> | 2024-02-09 11:16:28 -0800 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2024-02-21 18:26:05 +0000 |
commit | ff497306fd54cd9e40f2639666b35858f1b62b51 (patch) | |
tree | 00752ad170455a953d42c099f49a2b217134f8f3 /apps | |
parent | c7ad3bbbbb72121788cce2bffb5977e0048e310b (diff) | |
download | nextcloud-server-ff497306fd54cd9e40f2639666b35858f1b62b51.tar.gz nextcloud-server-ff497306fd54cd9e40f2639666b35858f1b62b51.zip |
fix(settings): Fix required groups validation for subadmins
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/src/components/Users/NewUserModal.vue | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/apps/settings/src/components/Users/NewUserModal.vue b/apps/settings/src/components/Users/NewUserModal.vue index ca80ae6d7ec..236bc6db7d8 100644 --- a/apps/settings/src/components/Users/NewUserModal.vue +++ b/apps/settings/src/components/Users/NewUserModal.vue @@ -75,13 +75,6 @@ spellcheck="false" :required="newUser.password === '' || settings.newUserRequireEmail" /> <div class="modal__item"> - <!-- hidden input trick for vanilla html5 form validation --> - <NcTextField v-if="!settings.isAdmin" - id="new-user-groups-input" - tabindex="-1" - :class="{ 'icon-loading-small': loading.groups }" - :value="newUser.groups" - :required="!settings.isAdmin" /> <label class="modal__label" for="new-user-groups"> {{ !settings.isAdmin ? t('settings', 'Groups (required)') : t('settings', 'Groups') }} @@ -96,13 +89,14 @@ :close-on-select="false" :multiple="true" :taggable="true" + :required="!settings.isAdmin" @input="handleGroupInput" @option:created="createGroup" /> <!-- If user is not admin, he is a subadmin. Subadmins can't create users outside their groups Therefore, empty select is forbidden --> </div> - <div v-if="subAdminsGroups.length > 0 && settings.isAdmin" + <div v-if="subAdminsGroups.length > 0" class="modal__item"> <label class="modal__label" for="new-user-sub-admin"> @@ -396,18 +390,6 @@ export default { align-items: center; padding: 20px; gap: 4px 0; - - /* fake input for groups validation */ - #new-user-groups-input { - position: absolute; - opacity: 0; - /* The "hidden" input is behind the NcSelect, so in general it does - * not receives clicks. However, with Firefox, after the validation - * fails, it will receive the first click done on it, so its width needs - * to be set to 0 to prevent that ("pointer-events: none" does not - * prevent it). */ - width: 0; - } } &__item { |