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 '
'; echo '
'; html_print_submit_button(__('Create'), 'create', false, 'class="sub next"'); @@ -612,3 +618,26 @@ if ($is_central_policies_on_node === false) { } enterprise_hook('close_meta_frame'); + +?> + + \ No newline at end of file diff --git a/pandora_console/godmode/alerts/configure_alert_command.php b/pandora_console/godmode/alerts/configure_alert_command.php index 2882d260db..88da3e5abf 100644 --- a/pandora_console/godmode/alerts/configure_alert_command.php +++ b/pandora_console/godmode/alerts/configure_alert_command.php @@ -21,7 +21,7 @@ check_login(); enterprise_hook('open_meta_frame'); -if (! check_acl($config['id_user'], 0, 'LM')) { +if (! check_acl($config['id_user'], 0, 'PM')) { db_pandora_audit( 'ACL Violation', 'Trying to access Alert Management' @@ -51,7 +51,7 @@ if (is_metaconsole() === true) { if ($id > 0) { $alert = alerts_get_alert_command($id); - if ($alert['internal'] || !check_acl_restricted_all($config['id_user'], $alert['id_group'], 'LM')) { + if ($alert['internal'] || !check_acl_restricted_all($config['id_user'], $alert['id_group'], 'PM')) { db_pandora_audit('ACL Violation', 'Trying to access Alert Management'); include 'general/noaccess.php'; exit;