mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-17 23:59:02 +00:00
Merge pull request #3217 from jumpserver/pr@dev@user_change_password
fix: 修改密码时 判断管理员校验规则失败
This commit is contained in:
@@ -45,7 +45,10 @@ export default {
|
||||
new_password: {
|
||||
label: this.$t('users.NewPassword'),
|
||||
rules: [rules.RequiredChange],
|
||||
component: UserPassword
|
||||
component: UserPassword,
|
||||
el: {
|
||||
userIsOrgAdmin: false
|
||||
}
|
||||
},
|
||||
new_password_again: {
|
||||
label: this.$t('users.ConfirmPassword'),
|
||||
@@ -57,6 +60,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.fieldsMeta.new_password.el.userIsOrgAdmin = this.object['is_org_admin']
|
||||
},
|
||||
methods: {
|
||||
submitMethod() {
|
||||
return 'put'
|
||||
|
@@ -193,7 +193,7 @@ export default {
|
||||
methods: {
|
||||
afterGetUser(user) {
|
||||
this.user = user
|
||||
this.fieldsMeta.password.el.userIsOrgAdmin = user.role === 'Admin' || user.org_roles.indexOf('Admin') !== -1
|
||||
this.fieldsMeta.password.el.userIsOrgAdmin = user['is_org_admin']
|
||||
if (this.$route.query.clone_from) {
|
||||
this.user.groups = []
|
||||
}
|
||||
|
Reference in New Issue
Block a user