mirror of
https://github.com/jumpserver/lina.git
synced 2025-10-21 23:59:22 +00:00
perf: 用户来源不是本地时禁用更新密码
This commit is contained in:
@@ -38,8 +38,8 @@ export default {
|
||||
url: '/api/v1/users/users/',
|
||||
fieldsMeta: {
|
||||
password_strategy: {
|
||||
hidden: () => {
|
||||
return this.$route.params.id
|
||||
hidden: (formValue) => {
|
||||
return this.$route.params.id || formValue.source !== 'local'
|
||||
}
|
||||
},
|
||||
email: {
|
||||
@@ -64,7 +64,7 @@ export default {
|
||||
if (formValue.password_strategy) {
|
||||
return false
|
||||
}
|
||||
return !formValue.update_password
|
||||
return !formValue.update_password || formValue.source !== 'local'
|
||||
},
|
||||
el: {
|
||||
required: false
|
||||
@@ -77,12 +77,12 @@ export default {
|
||||
if (formValue.set_public_key) {
|
||||
return true
|
||||
}
|
||||
return this.$route.meta.action !== 'update'
|
||||
return this.$route.meta.action !== 'update' || formValue.source !== 'local'
|
||||
}
|
||||
},
|
||||
public_key: {
|
||||
hidden: (formValue) => {
|
||||
return !formValue.set_public_key
|
||||
return !formValue.set_public_key || formValue.source !== 'local'
|
||||
}
|
||||
},
|
||||
role: {
|
||||
|
Reference in New Issue
Block a user