Skip to content

Commit 2174e0b

Browse files
artongenextcloud-command
authored andcommitted
fix(user_ldap): Properly update local variable for username and password in server settings
Signed-off-by: Louis Chmn <[email protected]>
1 parent b801f58 commit 2174e0b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

apps/user_ldap/src/components/SettingsTabs/ServerTab.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ import { showInfo } from '@nextcloud/dialogs'
9898
import { n, t } from '@nextcloud/l10n'
9999
import { NcButton, NcCheckboxRadioSwitch, NcTextArea, NcTextField } from '@nextcloud/vue'
100100
import { storeToRefs } from 'pinia'
101-
import { computed, ref } from 'vue'
101+
import { computed, ref, watch } from 'vue'
102102
import ContentCopy from 'vue-material-design-icons/ContentCopy.vue'
103103
import Delete from 'vue-material-design-icons/Delete.vue'
104104
import { callWizard } from '../../services/ldapConfigService.ts'
@@ -120,6 +120,18 @@ const needsToSaveCredentials = computed(() => {
120120
return ldapConfigProxy.value.ldapAgentName !== localLdapAgentName.value || ldapConfigProxy.value.ldapAgentPassword !== localLdapAgentPassword.value
121121
})
122122
123+
watch(
124+
ldapConfigProxy,
125+
(newVal) => {
126+
localLdapAgentName.value = newVal.ldapAgentName
127+
if (newVal.ldapAgentPassword === '***') {
128+
localLdapAgentPassword.value = ''
129+
} else {
130+
localLdapAgentPassword.value = newVal.ldapAgentPassword
131+
}
132+
},
133+
)
134+
123135
/**
124136
*
125137
*/

0 commit comments

Comments
 (0)