diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index 001cfc0430..20a84f0dc1 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -28,6 +28,12 @@ if (! check_acl($config['id_user'], 0, 'LM')) { exit; } +if (!check_acl($config['id_user'], 0, 'PM') && !is_user_admin($config['id_user'])) { + echo "
'; +} + if (is_metaconsole()) { $sec = 'advanced'; } else { @@ -558,7 +564,7 @@ foreach ($commands as $command) { $data['name'] = ''; // (IMPORTANT, DO NOT CHANGE!) only users with permissions over "All" group have access to edition of commands belonging to "All" group. - if (!$command['internal'] && check_acl_restricted_all($config['id_user'], $command['id_group'], 'LM')) { + if (!$command['internal'] && check_acl_restricted_all($config['id_user'], $command['id_group'], 'PM')) { $data['name'] .= ''.$command['name'].''; } else { $data['name'] .= $command['name']; @@ -584,7 +590,7 @@ foreach ($commands as $command) { $table->cellclass[]['action'] = 'action_buttons'; // (IMPORTANT, DO NOT CHANGE!) only users with permissions over "All" group have access to edition of commands belonging to "All" group. - if ($is_central_policies_on_node === false && !$command['internal'] && check_acl_restricted_all($config['id_user'], $command['id_group'], 'LM')) { + if ($is_central_policies_on_node === false && !$command['internal'] && check_acl_restricted_all($config['id_user'], $command['id_group'], 'PM')) { $data['action'] = ''; $data['action'] .= ''.html_print_image('images/copy.png', true).''; @@ -602,7 +608,7 @@ if (count($table->data) > 0) { ui_print_info_message(['no_close' => true, 'message' => __('No alert commands configured') ]); } -if ($is_central_policies_on_node === false) { +if ($is_central_policies_on_node === false && check_acl_restricted_all($config['id_user'], $command['id_group'], 'PM')) { echo '