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