fix: 修复资产/应用账号相关权限

This commit is contained in:
Jiangjie.Bai 2022-03-14 17:40:46 +08:00 committed by Jiangjie.Bai
parent 16f9329869
commit a51edf359b
3 changed files with 7 additions and 4 deletions

View File

@ -126,7 +126,7 @@ export default {
{ {
name: 'Test', name: 'Test',
title: this.$t('common.Test'), title: this.$t('common.Test'),
can: this.$hasPerm('assets.test_aauthbook'), can: this.$hasPerm('assets.test_authbook'),
callback: ({ row }) => { callback: ({ row }) => {
this.$axios.post( this.$axios.post(
`/api/v1/assets/accounts/${row.id}/verify/`, `/api/v1/assets/accounts/${row.id}/verify/`,
@ -159,7 +159,7 @@ export default {
hasLeftActions: this.hasLeftActions, hasLeftActions: this.hasLeftActions,
hasMoreActions: false, hasMoreActions: false,
hasImport: false, hasImport: false,
hasExport: true, hasExport: this.$hasPerm('assets.view_assetaccountsecret'),
exportOptions: { exportOptions: {
url: this.exportUrl, url: this.exportUrl,
mfaVerifyRequired: true mfaVerifyRequired: true

View File

@ -130,7 +130,7 @@ export default {
hasLeftActions: this.hasLeftActions, hasLeftActions: this.hasLeftActions,
hasMoreActions: false, hasMoreActions: false,
hasImport: false, hasImport: false,
hasExport: true, hasExport: this.$hasPerm('applications.view_applicationaccountsecret'),
exportOptions: { exportOptions: {
url: this.exportUrl, url: this.exportUrl,
mfaVerifyRequired: true mfaVerifyRequired: true

View File

@ -106,7 +106,10 @@ export default {
'xpack.add_syncinstancetask': [ 'xpack.add_syncinstancetask': [
'assets.view_asset', 'assets.view_node', 'assets.view_systemuser', 'assets.view_asset', 'assets.view_node', 'assets.view_systemuser',
'xpack.view_account' 'xpack.view_account'
] ],
'xpack.view_syncinstancetask': ['xpack.view_account'],
'xpack.view_syncinstancedetail': ['xpack.view_syncinstancetask'],
'xpack.view_syncinstancetaskexecution': ['xpack.view_syncinstancetask']
} }
} }
}, },