fix: 修复应用改密计划权限控制

This commit is contained in:
Jiangjie.Bai
2022-03-15 20:43:13 +08:00
committed by Jiangjie.Bai
parent 03431f98c8
commit 8467a64e9f
3 changed files with 9 additions and 3 deletions

View File

@@ -82,6 +82,7 @@ export default {
{
name: 'log',
type: 'primary',
can: 'xpack.view_applicationchangeauthplanexecution',
title: this.$t('xpack.ChangeAuthPlan.Log'),
callback: function({ row }) {
window.open(`/#/ops/celery/task/${row.id}/log/`, '_blank', 'toolbar=yes, width=900, height=600')
@@ -91,6 +92,7 @@ export default {
name: 'detail',
title: this.$t('xpack.ChangeAuthPlan.Detail'),
type: 'info',
can: 'xpack.view_applicationchangeauthplantask',
callback: function({ row }) {
return this.$router.push({ name: 'AppChangeAuthPlanExecutionDetail', params: { id: row.id }})
}

View File

@@ -29,15 +29,18 @@ export default {
submenu: [
{
title: this.$t('common.BasicInfo'),
name: 'AppChangeAuthPlanInfo'
name: 'AppChangeAuthPlanInfo',
hidden: !this.$hasPerm('xpack.view_applicationchangeauthplan')
},
{
title: this.$t('xpack.ChangeAuthPlan.SystemUser'),
name: 'ChangeAuthPlanDatabase'
name: 'ChangeAuthPlanDatabase',
hidden: !this.$hasPerm('xpack.change_applicationchangeauthplan')
},
{
title: this.$t('xpack.ChangeAuthPlan.ExecutionList'),
name: 'AppChangeAuthPlanExecutionList'
name: 'AppChangeAuthPlanExecutionList',
hidden: !this.$hasPerm('xpack.view_applicationchangeauthplanexecution')
}
],
actions: {

View File

@@ -74,6 +74,7 @@ export default {
{
name: 'log',
type: 'primary',
can: 'xpack.view_changeauthplanexecution',
title: this.$t('xpack.ChangeAuthPlan.Log'),
callback: function({ row }) {
window.open(`/#/ops/celery/task/${row.id}/log/`, '_blank', 'toolbar=yes, width=900, height=600')