From a851ccdfe756b437cf6ddef8a3e532b680adb25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Thu, 23 Feb 2023 11:01:34 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E4=B8=8B=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommandAcl/CommandFilterAcl/CommandFilterAclList.vue | 2 +- src/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue | 2 +- src/views/assets/Asset/AssetDetail/Detail.vue | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclList.vue b/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclList.vue index ef3c7ff19..cc7a39d54 100644 --- a/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclList.vue +++ b/src/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclList.vue @@ -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 } } } diff --git a/src/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue b/src/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue index 28da68382..facc826e2 100644 --- a/src/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue +++ b/src/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue @@ -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 } } } diff --git a/src/views/assets/Asset/AssetDetail/Detail.vue b/src/views/assets/Asset/AssetDetail/Detail.vue index 4444c081c..8d9fd812e 100644 --- a/src/views/assets/Asset/AssetDetail/Detail.vue +++ b/src/views/assets/Asset/AssetDetail/Detail.vue @@ -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() {