diff options
author | Louis Chemineau <louis@chmn.me> | 2024-10-10 10:11:50 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2025-03-25 21:31:14 +0100 |
commit | e59c5cae5b39d2f9f52f3d68690c6cfbb7e2ad01 (patch) | |
tree | 3fd02a1d16398e7700917d117f49b02826572d5e | |
parent | 4c603c8d076668caae0bef1931a6b074d520c960 (diff) | |
download | nextcloud-server-artonge/chore/ldap_wizard_rewrite.tar.gz nextcloud-server-artonge/chore/ldap_wizard_rewrite.zip |
Signed-off-by: Louis Chemineau <louis@chmn.me>
4 files changed, 23 insertions, 34 deletions
diff --git a/apps/user_ldap/src/LDAPSettingsApp.vue b/apps/user_ldap/src/LDAPSettingsApp.vue index 1541566e4aa..d2daeb62de6 100644 --- a/apps/user_ldap/src/LDAPSettingsApp.vue +++ b/apps/user_ldap/src/LDAPSettingsApp.vue @@ -6,16 +6,6 @@ <Settings /> </template> -<script lang="ts"> -import { defineComponent } from 'vue' - +<script lang="ts" setup> import Settings from './views/Settings.vue' - -export default defineComponent({ - name: 'LDAPSettingsApp', - - components: { - Settings, - }, -}) </script> diff --git a/apps/user_ldap/src/components/SettingsTabs/AdvancedTab.vue b/apps/user_ldap/src/components/SettingsTabs/AdvancedTab.vue index 70635d76c52..d51231076bd 100644 --- a/apps/user_ldap/src/components/SettingsTabs/AdvancedTab.vue +++ b/apps/user_ldap/src/components/SettingsTabs/AdvancedTab.vue @@ -81,26 +81,16 @@ :placeholder="t('user_ldap', 'Optional; one attribute per line')" :label="t('user_ldap', 'Group Search Attributes')" /> - <!-- TODO --> - <!-- <label for="ldap_group_member_assoc_attribute">{{ t('user_ldap', 'Group-Member association') }}</label> - <select id="ldap_group_member_assoc_attribute" :value="ldapConfig.ldapGroupMemberAssocAttribute"> - <option value="uniqueMember" :selected="ldap_group_member_assoc_attribute === 'uniqueMember'"> - {{ t('user_ldap', 'uniqueMember') }} - </option> - <option value="memberUid" :selected="ldap_group_member_assoc_attribute === 'memberUid'"> - {{ t('user_ldap', 'memberUid') }} - </option> - <option value="member" :selected="ldap_group_member_assoc_attribute === 'member'"> - {{ t('user_ldap', 'member (AD)') }} - </option> - <option value="gidNumber" :selected="ldap_group_member_assoc_attribute === 'gidNumber'"> - {{ t('user_ldap', 'gidNumber') }} - </option> - <option value="zimbraMailForwardingAddress" - :selected="ldap_group_member_assoc_attribute === 'zimbraMailForwardingAddress'"> - {{ t('user_ldap', 'zimbraMailForwardingAddress') }} - </option> - </select> --> + <NcSelect v-model="ldapConfig.ldapGroupMemberAssocAttr" + :options="Object.keys(groupMemberAssociation)" + :input-label="t('user_ldap', 'Group-Member association')"> + <template #option="{label: configId}"> + {{ groupMemberAssociation[configId] }} + </template> + <template #selected-option="{label: configId}"> + {{ groupMemberAssociation[configId] }} + </template> + </NcSelect> <NcTextField autocomplete="off" :label="t('user_ldap', 'Dynamic Group Member URL')" @@ -222,7 +212,7 @@ import { storeToRefs } from 'pinia' import { t } from '@nextcloud/l10n' -import { NcTextField, NcTextArea, NcCheckboxRadioSwitch } from '@nextcloud/vue' +import { NcTextField, NcTextArea, NcCheckboxRadioSwitch, NcSelect } from '@nextcloud/vue' import { getCapabilities } from '@nextcloud/capabilities' import { useLDAPConfigsStore } from '../../store/configs' @@ -231,6 +221,14 @@ const ldapConfigsStore = useLDAPConfigsStore() const { selectedConfig: ldapConfig } = storeToRefs(ldapConfigsStore) const instanceName = (getCapabilities() as { theming: { name:string } }).theming.name + +const groupMemberAssociation = { + uniqueMember: t('user_ldap', 'uniqueMember'), + memberUid: t('user_ldap', 'memberUid'), + member: t('user_ldap', 'member (AD)'), + gidNumber: t('user_ldap', 'gidNumber'), + zimbraMailForwardingAddress: t('user_ldap', 'zimbraMailForwardingAddress'), +} </script> <style lang="scss" scoped> .ldap-wizard__advanced { diff --git a/apps/user_ldap/src/components/SettingsTabs/GroupsTab.vue b/apps/user_ldap/src/components/SettingsTabs/GroupsTab.vue index c99e4f76343..208a3359fb3 100644 --- a/apps/user_ldap/src/components/SettingsTabs/GroupsTab.vue +++ b/apps/user_ldap/src/components/SettingsTabs/GroupsTab.vue @@ -14,6 +14,7 @@ :input-label="t('user_ldap', 'Only these object classes:')" :multiple="true" /> + <!-- TODO --> <!-- <input type="text" class="ldapManyGroupsSupport ldapManyGroupsSearch hidden" placeholder="t('user_ldap', 'Search groups')"> --> <NcSelect v-model="ldapConfig.ldapGroupFilterObjectclass" class="ldap-wizard__groups__group-filter-groups__select" diff --git a/apps/user_ldap/src/components/SettingsTabs/UsersTab.vue b/apps/user_ldap/src/components/SettingsTabs/UsersTab.vue index 44c2f626443..892d52b9f40 100644 --- a/apps/user_ldap/src/components/SettingsTabs/UsersTab.vue +++ b/apps/user_ldap/src/components/SettingsTabs/UsersTab.vue @@ -10,7 +10,6 @@ <NcSelect v-model="ldapConfig.ldapUserFilterObjectclass" :disabled="ldapConfig.ldapUserFilterMode === '1'" class="ldap-wizard__users__user-filter-object-class__select" - :disable="editUserFilter" :options="['TODO']" :input-label="t('user_name', 'Only these object classes:')" :multiple="true" /> @@ -22,8 +21,9 @@ {{ t('user_name', 'Only from these groups:') }} </div> + <!-- TODO --> <!-- <input type="text" class="ldapManyGroupsSupport ldapManyGroupsSearch hidden" > --> - <!-- <NcTextField :disable="editUserFilter" + <!-- <NcTextField :disabled="ldapConfig.ldapUserFilterMode === '1'" :value.sync="ldapConfig.ldapUserFilterGroups" :placeholder="t('user_name', 'Search groups')" autocomplete="off" /> --> |