From 2174e0b4fe1fb3b4c81fcea0c281146999460130 Mon Sep 17 00:00:00 2001 From: Louis Chmn Date: Thu, 27 Nov 2025 11:22:40 +0100 Subject: [PATCH] fix(user_ldap): Properly update local variable for username and password in server settings Signed-off-by: Louis Chmn --- .../src/components/SettingsTabs/ServerTab.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/src/components/SettingsTabs/ServerTab.vue b/apps/user_ldap/src/components/SettingsTabs/ServerTab.vue index 08a1da5c2c8..00f7e592fc1 100644 --- a/apps/user_ldap/src/components/SettingsTabs/ServerTab.vue +++ b/apps/user_ldap/src/components/SettingsTabs/ServerTab.vue @@ -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 + } + }, +) + /** * */