From 1ea005efaf755f143bf995669f8e1d78baadc436 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 21 Feb 2023 13:27:21 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AccountCreateUpdateForm/index.vue | 2 +- src/components/AccountListTable/AccountList.vue | 2 +- .../accounts/AssetAccount/AssetAccountDetail/Detail.vue | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/AccountCreateUpdateForm/index.vue b/src/components/AccountCreateUpdateForm/index.vue index c82770883..d59c3f8ca 100644 --- a/src/components/AccountCreateUpdateForm/index.vue +++ b/src/components/AccountCreateUpdateForm/index.vue @@ -161,7 +161,7 @@ export default { push_now: { hidden: () => { const automation = this.iPlatform.automation || {} - return !automation.push_account_enabled || !automation.ansible_enabled || !this.$hasPerm('assets.push_assetaccount') + return !automation.push_account_enabled || !automation.ansible_enabled || !this.$hasPerm('accounts.push_account') } } }, diff --git a/src/components/AccountListTable/AccountList.vue b/src/components/AccountListTable/AccountList.vue index f058039dd..1ef705f54 100644 --- a/src/components/AccountListTable/AccountList.vue +++ b/src/components/AccountListTable/AccountList.vue @@ -208,7 +208,7 @@ export default { { name: 'Test', title: this.$t('common.Test'), - can: this.$hasPerm('assets.test_account'), + can: this.$hasPerm('accounts.verify_account'), callback: ({ row }) => { this.$axios.post( `/api/v1/accounts/accounts/${row.id}/verify/`, diff --git a/src/views/accounts/AssetAccount/AssetAccountDetail/Detail.vue b/src/views/accounts/AssetAccount/AssetAccountDetail/Detail.vue index 55095b38d..c30884f9b 100644 --- a/src/views/accounts/AssetAccount/AssetAccountDetail/Detail.vue +++ b/src/views/accounts/AssetAccount/AssetAccountDetail/Detail.vue @@ -73,7 +73,7 @@ export default { attrs: { type: 'primary', label: this.$t('assets.Test'), - disabled: !vm.$hasPerm('assets.test_account') + disabled: !vm.$hasPerm('accounts.verify_account') }, callbacks: Object.freeze({ click: () => { @@ -94,7 +94,7 @@ export default { attrs: { type: 'primary', label: this.$t('assets.Push'), - disabled: !vm.$hasPerm('assets.push_assetaccount') + disabled: !vm.$hasPerm('accounts.push_account') }, callbacks: Object.freeze({ click: () => { @@ -123,7 +123,7 @@ export default { return { label: item.name + '(' + item.username + ')', value: item.id } } }, - disabled: !vm.$hasPerm('assets.test_account') || filterSuFrom.includes(vm.object?.asset?.category?.value) + disabled: !vm.$hasPerm('accounts.verify_account') || filterSuFrom.includes(vm.object?.asset?.category?.value) }, callbacks: Object.freeze({ change: (value) => {