From 4e1e9a1d991b5792ef9c42d307f8802cc0bfd0a2 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Thu, 1 Jun 2023 12:27:58 +0200 Subject: [PATCH] #11431 Fix alert conditional table and menu --- pandora_console/godmode/menu.php | 1 - .../operation/agentes/alerts_status.php | 42 +++++++++---------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 0546647846..c4163611a2 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -259,7 +259,6 @@ if ($access_console_node === true) { if ((bool) check_acl($config['id_user'], 0, 'LW') === true || (bool) check_acl($config['id_user'], 0, 'LM') === true - || (bool) check_acl($config['id_user'], 0, 'AD') === true ) { $menu_godmode['galertas']['text'] = __('Alerts'); $menu_godmode['galertas']['sec2'] = 'godmode/alerts/alert_list'; diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index 8c251903af..b3c69730f3 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -271,29 +271,27 @@ if ((bool) check_acl($config['id_user'], $id_group, 'LW') === true || (bool) che } } -if ((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) check_acl($config['id_user'], $id_group, 'LM') === true) { - array_push( - $column_names, - ['text' => 'Module'], - ['text' => 'Template'], - [ - 'title' => __('Action'), - 'text' => __('Action'), - 'style' => 'min-width: 15%;', - ], - ['text' => 'Last fired'], - ['text' => 'Status'] - ); +array_push( + $column_names, + ['text' => 'Module'], + ['text' => 'Template'], + [ + 'title' => __('Action'), + 'text' => __('Action'), + 'style' => 'min-width: 15%;', + ], + ['text' => 'Last fired'], + ['text' => 'Status'] +); - $columns = array_merge( - $columns, - ['agent_module_name'], - ['template_name'], - ['action'], - ['last_fired'], - ['status'] - ); -} +$columns = array_merge( + $columns, + ['agent_module_name'], + ['template_name'], + ['action'], + ['last_fired'], + ['status'] +); if (is_metaconsole() === false) { if ((bool) check_acl($config['id_user'], $id_group, 'LW') === true || (bool) check_acl($config['id_user'], $id_group, 'LM') === true) {