Skip to content

Commit

Permalink
fix: 修复创建用户时 先输入密码再选择来源为LDAP 密码项仍可输入未隐藏的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
RedAtman authored and BaiJiangJie committed Jun 19, 2023
1 parent d165f87 commit 3bf8a6d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/views/users/User/UserCreateUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ export default {
password: {
component: UserPassword,
hidden: (formValue) => {
if (formValue.password_strategy === 'custom') {
if (formValue.source !== 'local') {
return true
}
if (formValue.password_strategy === 'custom' || formValue.update_password) {
return false
}
return !formValue.update_password || formValue.source !== 'local'
return true
},
el: {
required: false,
Expand All @@ -79,10 +82,13 @@ export default {
}
],
hidden: (formValue) => {
if (formValue.password_strategy === 'custom') {
if (formValue.source !== 'local') {
return true
}
if (formValue.password_strategy === 'custom' || formValue.update_password || this.user.can_public_key_auth) {
return false
}
return !formValue.update_password || !this.user.can_public_key_auth
return true
}
},
set_public_key: {
Expand Down

0 comments on commit 3bf8a6d

Please sign in to comment.