mirror of
https://github.com/nextcloud/server.git
synced 2026-06-04 22:35:24 -04:00
fix(user_ldap): Improve case where selected config is undefined
Signed-off-by: Louis Chmn <louis@chmn.me>
This commit is contained in:
parent
75312017d4
commit
ae8b6290e1
2 changed files with 5 additions and 4 deletions
|
|
@ -148,7 +148,7 @@ async function guessPortAndTLS() {
|
|||
loadingGuessPortAndTLS.value = true
|
||||
const { changes } = await callWizard('guessPortAndTLS', props.configId)
|
||||
// Not using ldapConfigProxy to avoid triggering the save logic.
|
||||
ldapConfigs.value[props.configId].ldapPort = (changes!.ldap_port as string) ?? ''
|
||||
ldapConfigs.value[props.configId]!.ldapPort = (changes!.ldap_port as string) ?? ''
|
||||
} finally {
|
||||
loadingGuessPortAndTLS.value = false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@
|
|||
:options="Object.keys(ldapConfigs)"
|
||||
:input-label="t('user_ldap', 'Select LDAP Config')">
|
||||
<template #option="{ label: configId }">
|
||||
{{ `${configId}: ${ldapConfigs[configId].ldapHost}` }}
|
||||
{{ `${configId}: ${ldapConfigs[configId]?.ldapHost ?? ''}` }}
|
||||
</template>
|
||||
<template #selected-option="{ label: configId }">
|
||||
{{ `${configId}: ${ldapConfigs[configId].ldapHost}` }}
|
||||
{{ `${configId}: ${ldapConfigs[configId]?.ldapHost ?? ''}` }}
|
||||
</template>
|
||||
</NcSelect>
|
||||
<NcButton
|
||||
|
|
@ -123,7 +123,8 @@ const selectedTab = ref('server')
|
|||
const clearMappingLoading = ref(false)
|
||||
|
||||
const selectedConfigHasServerInfo = computed(() => {
|
||||
return selectedConfig.value.ldapHost !== ''
|
||||
return selectedConfig.value !== undefined
|
||||
&& selectedConfig.value.ldapHost !== ''
|
||||
&& selectedConfig.value.ldapPort !== ''
|
||||
&& selectedConfig.value.ldapBase !== ''
|
||||
&& selectedConfig.value.ldapAgentName !== ''
|
||||
|
|
|
|||
Loading…
Reference in a new issue