fix(user_ldap): Properly update local variable for username and password in server settings

Signed-off-by: Louis Chmn <louis@chmn.me>
This commit is contained in:
Louis Chmn 2025-11-27 11:22:40 +01:00 committed by nextcloud-command
parent b801f583d8
commit 2174e0b4fe

View file

@ -98,7 +98,7 @@ import { showInfo } from '@nextcloud/dialogs'
import { n, t } from '@nextcloud/l10n'
import { NcButton, NcCheckboxRadioSwitch, NcTextArea, NcTextField } from '@nextcloud/vue'
import { storeToRefs } from 'pinia'
import { computed, ref } from 'vue'
import { computed, ref, watch } from 'vue'
import ContentCopy from 'vue-material-design-icons/ContentCopy.vue'
import Delete from 'vue-material-design-icons/Delete.vue'
import { callWizard } from '../../services/ldapConfigService.ts'
@ -120,6 +120,18 @@ const needsToSaveCredentials = computed(() => {
return ldapConfigProxy.value.ldapAgentName !== localLdapAgentName.value || ldapConfigProxy.value.ldapAgentPassword !== localLdapAgentPassword.value
})
watch(
ldapConfigProxy,
(newVal) => {
localLdapAgentName.value = newVal.ldapAgentName
if (newVal.ldapAgentPassword === '***') {
localLdapAgentPassword.value = ''
} else {
localLdapAgentPassword.value = newVal.ldapAgentPassword
}
},
)
/**
*
*/