diff --git a/src/router/console/accounts.js b/src/router/console/accounts.js index beda26024..103692308 100644 --- a/src/router/console/accounts.js +++ b/src/router/console/accounts.js @@ -74,22 +74,14 @@ export default [ activeMenu: '/accounts/gathered-user' } }, - { - path: 'tasks', - component: () => import('@/views/accounts/GatheredUser/TaskList'), - name: 'GatherUserTaskList', - hidden: true, - meta: { - title: i18n.t('xpack.GatherUser.GatherUserTaskList') - } - }, { path: 'tasks/:id', component: () => import('@/views/accounts/GatheredUser/TaskDetail/index'), name: 'GatherUserTaskDetail', hidden: true, meta: { - title: i18n.t('xpack.GatherUser.GatherUserTaskDetail') + title: i18n.t('xpack.GatherUser.GatherUserTaskDetail'), + permissions: ['xpack.view_gatherusertask'] } }, { @@ -98,7 +90,8 @@ export default [ name: 'GatherUserTaskCreate', hidden: true, meta: { - title: i18n.t('xpack.GatherUser.GatherUserTaskCreate') + title: i18n.t('xpack.GatherUser.GatherUserTaskCreate'), + permissions: ['xpack.add_gatherusertask'] } }, { @@ -109,6 +102,7 @@ export default [ meta: { title: i18n.t('xpack.GatherUser.GatherUserTaskUpdate'), action: 'update', + permissions: ['xpack.change_gatherusertask'], activeMenu: '/accounts/gathered-user' } } diff --git a/src/views/accounts/GatheredUser/TaskDetail/index.vue b/src/views/accounts/GatheredUser/TaskDetail/index.vue index f8b2fe1fe..7bcbeb2ea 100644 --- a/src/views/accounts/GatheredUser/TaskDetail/index.vue +++ b/src/views/accounts/GatheredUser/TaskDetail/index.vue @@ -23,6 +23,10 @@ export default { TaskDetail: {}, config: { activeMenu: 'Detail', + actions: { + canUpdate: this.$hasPerm('xpack.change_gatherusertask'), + canDelete: this.$hasPerm('xpack.delete_gatherusertask') + }, submenu: [ { title: this.$t('xpack.GatherUser.GatherUserTaskDetail'), @@ -30,7 +34,8 @@ export default { }, { title: this.$t('xpack.GatherUser.GatherUserTaskExecutionList'), - name: 'TaskExecutionList' + name: 'TaskExecutionList', + hidden: !this.$hasPerm('xpack.view_gatherusertaskexecution') } ], hasRightSide: true diff --git a/src/views/accounts/GatheredUser/TaskList.vue b/src/views/accounts/GatheredUser/TaskList.vue index deae5c27b..9f7f1da30 100644 --- a/src/views/accounts/GatheredUser/TaskList.vue +++ b/src/views/accounts/GatheredUser/TaskList.vue @@ -59,6 +59,7 @@ export default { formatter: DetailFormatter, formatterArgs: { route: 'GatherUserTaskDetail', + can: vm.$hasPerm('xpack.view_gatherusertaskexecution'), routeQuery: { activeTab: 'TaskExecutionList' }