fix: 修复删除source字段引起的无法更新密码的问题 (#534)

Co-authored-by: Orange <orangemtony@gmail.com>
This commit is contained in:
fit2bot
2020-12-09 16:21:59 +08:00
committed by GitHub
parent 4a757bb6bc
commit 435ce24c75
2 changed files with 11 additions and 6 deletions

View File

@@ -22,14 +22,14 @@ export default {
initial: {
password_strategy: 0,
mfa_level: 0,
source: 'local',
role: 'User',
source: 'local',
org_roles: ['User'],
date_expired: getDayFuture(36500, new Date()).toISOString()
},
fields: [
[this.$t('users.Account'), ['name', 'username', 'email', 'groups']],
[this.$t('users.Authentication'), ['password_strategy', 'update_password', 'password', 'set_public_key', 'public_key', 'mfa_level']],
[this.$t('users.Authentication'), ['password_strategy', 'update_password', 'password', 'set_public_key', 'public_key', 'mfa_level', 'source']],
[this.$t('users.Secure'), ['role', 'org_roles', 'date_expired']],
[this.$t('common.Other'), ['phone', 'wechat', 'comment']]
],
@@ -50,6 +50,9 @@ export default {
return this.$route.meta.action !== 'update' || formValue.source !== 'local'
}
},
source: {
hidden: () => { return true }
},
password: {
component: UserPassword,
hidden: (formValue) => {