fix: 修复云同步点击进入详情页面没有权限问题

This commit is contained in:
“huailei000”
2022-03-08 12:49:15 +08:00
committed by Jiangjie.Bai
parent c5c412ccac
commit 3eb28f5517
3 changed files with 11 additions and 4 deletions

View File

@@ -175,7 +175,7 @@ export default {
{
name: this.$t('xpack.Cloud.CloudSync'),
title: this.$t('xpack.Cloud.CloudSync'),
can: () => this.$hasPerm('xpack.view_account'),
has: () => vm.$hasPerm('xpack.view_account') && vm.$hasLicense(),
callback: () => this.$router.push({ name: 'CloudCenter' })
}
],

View File

@@ -28,15 +28,19 @@ export default {
submenu: [
{
title: this.$t('xpack.Cloud.SyncInstanceTaskDetail'),
name: 'detail'
name: 'detail',
hidden: () => !this.$hasPerm('xpack.view_syncinstancedetail')
},
{
title: this.$t('xpack.Cloud.SyncInstanceTaskHistoryList'),
name: 'HistoryList'
name: 'HistoryList',
hidden: () => !this.$hasPerm('xpack.view_syncinstancetaskexecution')
},
{
title: this.$t('xpack.Cloud.SyncInstanceTaskHistoryAssetList'),
name: 'AssetList'
name: 'AssetList',
hidden: () => !this.$hasPerm('xpack.view_syncinstancetask')
}
],
hasRightSide: true

View File

@@ -51,6 +51,7 @@ export default {
name: {
formatter: DetailFormatter,
formatterArgs: {
permissions: 'xpack.view_syncinstancedetail',
route: 'SyncInstanceTaskDetail',
routeQuery: {
activeTab: 'detail'
@@ -61,6 +62,7 @@ export default {
width: '110px',
formatter: DetailFormatter,
formatterArgs: {
permissions: 'xpack.view_syncinstancetaskexecution',
route: 'SyncInstanceTaskDetail',
routeQuery: {
activeTab: 'HistoryList'
@@ -70,6 +72,7 @@ export default {
instance_count: {
formatter: DetailFormatter,
formatterArgs: {
permissions: 'xpack.view_syncinstancetask',
route: 'SyncInstanceTaskDetail',
routeQuery: {
activeTab: 'AssetList'