mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-02 15:36:24 +00:00
perf: 优化全局组织下权限
This commit is contained in:
@@ -43,7 +43,7 @@ export default {
|
||||
hasMoreActions: false,
|
||||
createRoute: 'CommandFilterAclCreate',
|
||||
canCreate: () => {
|
||||
return this.$hasPerm('acls.add_commandfilteracl')
|
||||
return this.$hasPerm('acls.add_commandfilteracl') && !this.$store.getters.currentOrgIsRoot
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ export default {
|
||||
hasMoreActions: false,
|
||||
createRoute: 'CommandGroupCreate',
|
||||
canCreate: () => {
|
||||
return this.$hasPerm('acls.add_commandgroup')
|
||||
return this.$hasPerm('acls.add_commandgroup') && !this.$store.getters.currentOrgIsRoot
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -73,7 +73,8 @@ export default {
|
||||
label: this.$t('assets.Refresh'),
|
||||
disabled: !vm.$hasPerm('assets.refresh_assethardwareinfo') ||
|
||||
!this.object['auto_info'].gather_facts_enabled ||
|
||||
!this.object['auto_info'].ansible_enabled
|
||||
!this.object['auto_info'].ansible_enabled ||
|
||||
this.$store.getters.currentOrgIsRoot
|
||||
},
|
||||
callbacks: {
|
||||
click: function() {
|
||||
@@ -94,7 +95,8 @@ export default {
|
||||
label: this.$t('assets.Test'),
|
||||
disabled: !vm.$hasPerm('assets.test_assetconnectivity') ||
|
||||
!this.object['auto_info'].ansible_enabled ||
|
||||
!this.object['auto_info']['ping_enabled']
|
||||
!this.object['auto_info']['ping_enabled'] ||
|
||||
this.$store.getters.currentOrgIsRoot
|
||||
},
|
||||
callbacks: {
|
||||
click: function() {
|
||||
|
Reference in New Issue
Block a user