From c26c4c9daa319222d792ddfb1bcc48e654899fda Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 14 Aug 2021 16:56:10 +0200 Subject: [PATCH] Fix user password change not working properly --- app/src/views/user/UserEdit.vue | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app/src/views/user/UserEdit.vue b/app/src/views/user/UserEdit.vue index b5a7dafa..adb409ac 100644 --- a/app/src/views/user/UserEdit.vue +++ b/app/src/views/user/UserEdit.vue @@ -99,7 +99,7 @@
- + @@ -142,7 +142,7 @@ export default { mailbox_quota: '', mail_aliases: [], mail_forward: [], - password: '', + change_password: '', confirmation: '' }, @@ -201,11 +201,11 @@ export default { } }, - password: { + change_password: { label: this.$i18n.t('password'), description: this.$i18n.t('good_practices_about_user_password'), descriptionVariant: 'warning', - props: { id: 'password', type: 'password', placeholder: '••••••••' } + props: { id: 'change_password', type: 'password', placeholder: '••••••••' } }, confirmation: { @@ -236,8 +236,8 @@ export default { mail_forward: { $each: { required, emailForward } }, - password: { passwordLenght: minLength(8) }, - confirmation: { passwordMatch: sameAs('password') } + change_password: { passwordLenght: minLength(8) }, + confirmation: { passwordMatch: sameAs('change_password') } } }, @@ -273,9 +273,6 @@ export default { if (!Object.prototype.hasOwnProperty.call(formData, 'mailbox_quota')) { formData.mailbox_quota = '' } - if (Object.prototype.hasOwnProperty.call(formData, 'password')) { - formData['change-password'] = formData.password - } for (const key of ['mail_aliases', 'mail_forward']) { const dashedKey = key.replace('_', '-')