fix: 修复资产账号列表测试权限控制

This commit is contained in:
Bai
2023-02-23 11:42:45 +08:00
committed by Jiangjie.Bai
parent c1f0fbbfd9
commit f3616f06e8

View File

@@ -203,7 +203,11 @@ export default {
{
name: 'Test',
title: this.$t('common.Test'),
can: this.$hasPerm('accounts.change_account') && !this.$store.getters.currentOrgIsRoot,
can: ({ row }) =>
!this.$store.getters.currentOrgIsRoot &&
this.$hasPerm('accounts.change_account') &&
row.asset['auto_info'].ansible_enabled &&
row.asset['auto_info'].ping_enabled,
callback: ({ row }) => {
this.$axios.post(
`/api/v1/accounts/accounts/tasks/`,