From f3b15727cbc36fbfb3d031dacd47d613bc210c35 Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Sat, 22 May 2021 16:57:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=88=9B=E5=BB=BA/=E6=9B=B4=E6=96=B0=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E9=80=89=E9=A1=B9=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/users/User/UserCreateUpdate.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/users/User/UserCreateUpdate.vue b/src/views/users/User/UserCreateUpdate.vue index aa4e43c1a..5a614c9f5 100644 --- a/src/views/users/User/UserCreateUpdate.vue +++ b/src/views/users/User/UserCreateUpdate.vue @@ -59,7 +59,7 @@ export default { password: { component: UserPassword, hidden: (formValue) => { - if (formValue.password_strategy) { + if (formValue.password_strategy === 'custom') { return false } return !formValue.update_password @@ -81,7 +81,7 @@ export default { } ], hidden: (formValue) => { - if (formValue.password_strategy) { + if (formValue.password_strategy === 'custom') { return false } return !formValue.update_password || !this.user.can_public_key_auth @@ -148,7 +148,7 @@ export default { methods: { cleanFormValue(value) { const method = this.getMethod() - if (method === 'post' && !value.password_strategy) { + if (method === 'post' && value.password_strategy === 'email') { delete value['password'] if (this.currentOrgIsRoot) { delete value['groups']