From 088dbc4e42228b0735bfdc2a3292cbbb0bd30dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Mon, 21 Mar 2022 14:41:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7-=E8=B5=84=E4=BA=A7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90=E4=B8=8D=E5=87=86=E7=A1=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/SystemUser/SystemUserDetail/AssetList.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/views/assets/SystemUser/SystemUserDetail/AssetList.vue b/src/views/assets/SystemUser/SystemUserDetail/AssetList.vue index d927dbe49..dc7acbe67 100644 --- a/src/views/assets/SystemUser/SystemUserDetail/AssetList.vue +++ b/src/views/assets/SystemUser/SystemUserDetail/AssetList.vue @@ -68,7 +68,7 @@ export default { name: 'Push', title: this.$t('common.Push'), type: 'primary', - can: this.object.auto_push, + can: this.object.auto_push && vm.$hasPerm('assets.push_assetsystemuser'), callback: ({ row }) => { const theUrl = `/api/v1/assets/system-users/${vm.object.id}/tasks/` const data = { action: 'push', assets: [row.asset] } @@ -81,7 +81,7 @@ export default { name: 'Delete', title: this.$t('common.Delete'), type: 'danger', - can: !this.$store.getters.currentOrgIsRoot, + can: !this.$store.getters.currentOrgIsRoot && vm.$hasPerm('assets.delete_authbook'), callback: (val) => { this.$axios.delete(`/api/v1/assets/system-users-assets-relations/${val.row.id}/`).then(() => { this.$message.success(this.$t('common.deleteSuccessMsg')) @@ -103,7 +103,7 @@ export default { title: this.$t('common.PushSelected'), name: 'PushSelected', can({ selectedRows }) { - return selectedRows.length > 0 && vm.object.auto_push + return selectedRows.length > 0 && vm.object.auto_push && vm.$hasPerm('assets.push_assetsystemuser') }, callback: this.bulkPushCallback.bind(this) }, @@ -111,7 +111,7 @@ export default { title: this.$t('assets.TestAssetsConnective'), name: 'TestSelected', can({ selectedRows }) { - return selectedRows.length > 0 + return selectedRows.length > 0 && vm.$hasPerm('assets.test_assetconnectivity') }, callback: this.bulkTestCallback.bind(this) } @@ -122,7 +122,8 @@ export default { title: this.$t('assets.TestAssetsConnective'), attrs: { type: 'primary', - label: this.$t('common.Test') + label: this.$t('common.Test'), + disabled: !vm.$hasPerm('assets.test_assetconnectivity') }, callbacks: { click: function() {