fix: 修复 rbac 相关权限位问题

This commit is contained in:
Bai 2023-02-14 19:02:21 +08:00 committed by Jiangjie.Bai
parent d2226c0b00
commit 2e6bb9ab66
3 changed files with 5 additions and 2 deletions

View File

@ -22,11 +22,13 @@ export default {
{ {
title: this.$t('acl.CommandFilterACL'), title: this.$t('acl.CommandFilterACL'),
name: 'CommandFilterACL', name: 'CommandFilterACL',
hidden: !this.$hasPerm('acls.view_commandfilteracl'),
component: () => import('@/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclList.vue') component: () => import('@/views/acl/CommandAcl/CommandFilterAcl/CommandFilterAclList.vue')
}, },
{ {
title: this.$t('acl.CommandGroup'), title: this.$t('acl.CommandGroup'),
name: 'CommandGroup', name: 'CommandGroup',
hidden: !this.$hasPerm('acls.view_commandgroup'),
component: () => import('@/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue') component: () => import('@/views/acl/CommandAcl/CommandGroup/CommandGroupList.vue')
} }
] ]

View File

@ -73,7 +73,7 @@ export default {
name: this.$t('setting.Create'), name: this.$t('setting.Create'),
title: this.$t('setting.Create'), title: this.$t('setting.Create'),
type: 'primary', type: 'primary',
can: true, can: this.$hasPerm('authentication.add_temptoken'),
callback: function() { callback: function() {
this.$axios.post( this.$axios.post(
`/api/v1/authentication/temp-tokens/` `/api/v1/authentication/temp-tokens/`

View File

@ -96,9 +96,10 @@ export default {
], ],
'acls.loginacl': ['users.view_user'], 'acls.loginacl': ['users.view_user'],
'acls.loginassetacl': ['users.view_user'], 'acls.loginassetacl': ['users.view_user'],
'acls.commandfilteracl': ['users.view_user'],
'assets.view_asset': ['assets.view_node', 'assets.view_platform'], 'assets.view_asset': ['assets.view_node', 'assets.view_platform'],
'assets.view_node': ['assets.view_asset', 'assets.view_platform'], 'assets.view_node': ['assets.view_asset', 'assets.view_platform'],
'assets.commandfilterrule': ['assets.view_commandfilter'], 'acls.commandgroup': ['acls.view_commandfilteracl'],
'assets.gateway': ['assets.view_domain'], 'assets.gateway': ['assets.view_domain'],
'assets.add_gateway': ['assets.view_domain', 'assets.view_platform', 'assets.view_node'], 'assets.add_gateway': ['assets.view_domain', 'assets.view_platform', 'assets.view_node'],
'assets.change_gateway': ['assets.view_domain', 'assets.view_platform', 'assets.view_node'], 'assets.change_gateway': ['assets.view_domain', 'assets.view_platform', 'assets.view_node'],