fix: 修改用户创建/更新密码策略选项值

This commit is contained in:
Michael Bai
2021-05-22 16:57:20 +08:00
committed by 老广
parent a80918139b
commit f3b15727cb

View File

@@ -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']