mirror of
https://github.com/jumpserver/lina.git
synced 2025-10-22 08:08:39 +00:00
perf: 优化全局组织 (#621)
* feat: 默认组织改为实体组织 * perf: 优化在root组织下,应不能创建 * perf: 优化全局组织 * perf: 优化组织选择 Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -29,7 +29,10 @@ export default {
|
||||
},
|
||||
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', 'source']],
|
||||
[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']]
|
||||
],
|
||||
@@ -80,7 +83,7 @@ export default {
|
||||
role: {
|
||||
label: this.$t('users.SuperRole'),
|
||||
hidden: () => {
|
||||
return !this.currentOrgIsDefault && this.publicSettings.role === 'Admin'
|
||||
return !this.currentOrgIsRoot && this.publicSettings.role === 'Admin'
|
||||
}
|
||||
},
|
||||
org_roles: {
|
||||
@@ -88,7 +91,7 @@ export default {
|
||||
label: this.$t('users.OrgRole'),
|
||||
component: RoleCheckbox,
|
||||
hidden: () => {
|
||||
return (!this.publicSettings.XPACK_LICENSE_IS_VALID)
|
||||
return !this.publicSettings.XPACK_LICENSE_IS_VALID
|
||||
},
|
||||
el: {
|
||||
disabled: false,
|
||||
@@ -109,13 +112,10 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['publicSettings', 'currentOrg']),
|
||||
currentOrgIsDefault() {
|
||||
return this.currentOrg.id === 'DEFAULT' || this.currentOrg.id === ''
|
||||
}
|
||||
...mapGetters(['publicSettings', 'currentOrgIsRoot'])
|
||||
},
|
||||
mounted() {
|
||||
if (this.currentOrgIsDefault) {
|
||||
if (this.currentOrgIsRoot) {
|
||||
this.fieldsMeta.org_roles.el.disabled = true
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user