mirror of
https://github.com/jumpserver/lina.git
synced 2026-05-14 19:05:48 +00:00
fix: prevent unauthorized users from seeing PAM actions in asset list
This commit is contained in:
@@ -245,7 +245,9 @@ export function getDefaultConfig(vm) {
|
||||
name: 'AddAccount',
|
||||
title: vm.$t('AddAccount'),
|
||||
divided: true,
|
||||
can: ({ row }) => !vm.$store.getters.currentOrgIsRoot,
|
||||
has: ({ row }) =>
|
||||
!vm.$store.getters.currentOrgIsRoot &&
|
||||
vm.$hasPerm('accounts.add_account'),
|
||||
callback: ({ row }) => {
|
||||
vm.asset = row
|
||||
vm.showAddDialog = true
|
||||
@@ -254,7 +256,9 @@ export function getDefaultConfig(vm) {
|
||||
{
|
||||
name: 'DiscoverAccounts',
|
||||
title: vm.$t('AccountDiscover'),
|
||||
can: ({ row }) => !vm.$store.getters.currentOrgIsRoot,
|
||||
has: ({ row }) =>
|
||||
!vm.$store.getters.currentOrgIsRoot &&
|
||||
vm.$hasPerm('accounts.add_gatheraccountsexecution'),
|
||||
callback: ({ row }) => {
|
||||
vm.discoveryDialog.asset = row.id
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user