perf: 修改权限位

This commit is contained in:
ibuler
2023-02-21 13:27:21 +08:00
parent adbaefece9
commit 1ea005efaf
3 changed files with 5 additions and 5 deletions

View File

@@ -161,7 +161,7 @@ export default {
push_now: {
hidden: () => {
const automation = this.iPlatform.automation || {}
return !automation.push_account_enabled || !automation.ansible_enabled || !this.$hasPerm('assets.push_assetaccount')
return !automation.push_account_enabled || !automation.ansible_enabled || !this.$hasPerm('accounts.push_account')
}
}
},

View File

@@ -208,7 +208,7 @@ export default {
{
name: 'Test',
title: this.$t('common.Test'),
can: this.$hasPerm('assets.test_account'),
can: this.$hasPerm('accounts.verify_account'),
callback: ({ row }) => {
this.$axios.post(
`/api/v1/accounts/accounts/${row.id}/verify/`,

View File

@@ -73,7 +73,7 @@ export default {
attrs: {
type: 'primary',
label: this.$t('assets.Test'),
disabled: !vm.$hasPerm('assets.test_account')
disabled: !vm.$hasPerm('accounts.verify_account')
},
callbacks: Object.freeze({
click: () => {
@@ -94,7 +94,7 @@ export default {
attrs: {
type: 'primary',
label: this.$t('assets.Push'),
disabled: !vm.$hasPerm('assets.push_assetaccount')
disabled: !vm.$hasPerm('accounts.push_account')
},
callbacks: Object.freeze({
click: () => {
@@ -123,7 +123,7 @@ export default {
return { label: item.name + '(' + item.username + ')', value: item.id }
}
},
disabled: !vm.$hasPerm('assets.test_account') || filterSuFrom.includes(vm.object?.asset?.category?.value)
disabled: !vm.$hasPerm('accounts.verify_account') || filterSuFrom.includes(vm.object?.asset?.category?.value)
},
callbacks: Object.freeze({
change: (value) => {