From d73ecec0b45b00b8646d19f93f5a8ac8c506ac38 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 21 Feb 2011 11:42:14 +0000 Subject: [PATCH] 2011-02-21 Miguel de Dios * godmode/alerts/alert_list.builder.php: added the conditional to hide the create template or action when the user haven't privileges for this action. Fixes: #3182535 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ .../godmode/alerts/alert_list.builder.php | 21 +++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 190d58e907..6394985aa1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-02-21 Miguel de Dios + + * godmode/alerts/alert_list.builder.php: added the conditional to hide the + create template or action when the user haven't privileges for this action. + + Fixes: #3182535 + 2011-02-21 Ramon Novoa * operation/agentes/alerts_status.php: Fixed ACL check for alerts. diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php index 49e926714e..012fec4859 100644 --- a/pandora_console/godmode/alerts/alert_list.builder.php +++ b/pandora_console/godmode/alerts/alert_list.builder.php @@ -78,11 +78,12 @@ $table->data[1][1] = print_select (index_array ($templates, 'id', 'name'), 'template', '', '', __('Select'), 0, true); $table->data[1][1] .= ' '; - -$table->data[1][1] .= print_image ('images/add.png', true); -$table->data[1][1] .= ''; -$table->data[1][1] .= __('Create Template'); -$table->data[1][1] .= ''; +if (give_acl ($config['id_user'], 0, "LM")) { + $table->data[1][1] .= print_image ('images/add.png', true); + $table->data[1][1] .= ''; + $table->data[1][1] .= __('Create Template'); + $table->data[1][1] .= ''; +} $table->data[2][0] = __('Actions'); @@ -100,10 +101,12 @@ $table->data[2][1] .= print_input_text ('fires_max', '', '', 4, 10, true); $table->data[2][1] .= print_help_icon ("alert-matches", true); $table->data[2][1] .= ''; $table->data[2][1] .= ''; -$table->data[2][1] .= print_image ('images/add.png', true); -$table->data[2][1] .= ''; -$table->data[2][1] .= __('Create Action'); -$table->data[2][1] .= ''; +if (give_acl ($config['id_user'], 0, "LM")) { + $table->data[2][1] .= print_image ('images/add.png', true); + $table->data[2][1] .= ''; + $table->data[2][1] .= __('Create Action'); + $table->data[2][1] .= ''; +} $table->data[3][0] = __('Threshold'); $table->data[3][1] = print_input_text ('module_action_threshold', '', '', 4, 10, true) . print_help_icon ('action_threshold', true);