From f5cb3c5c79b487a1a3922fad6cc06c8c2941fec9 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Diaz Date: Fri, 10 Jul 2015 15:28:30 +0200 Subject: [PATCH] Change acl bits. Ticket #2404 --- .../godmode/agentes/planned_downtime.list.php | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pandora_console/godmode/agentes/planned_downtime.list.php b/pandora_console/godmode/agentes/planned_downtime.list.php index 71d87b22d9..b0d24c185e 100755 --- a/pandora_console/godmode/agentes/planned_downtime.list.php +++ b/pandora_console/godmode/agentes/planned_downtime.list.php @@ -18,7 +18,7 @@ global $config; check_login(); -if (! check_acl ($config['id_user'], 0, "AW")) { +if (! check_acl ($config['id_user'], 0, "AR")) { db_pandora_audit("ACL Violation", "Trying to access downtime scheduler"); require ("general/noaccess.php"); @@ -299,7 +299,9 @@ $table->head[5] = __('Configuration'); $table->head[6] = __('Running'); $table->head[7] = __('Stop downtime'); $table->head[8] = __('Edit'); -$table->head[9] = __('Delete'); +if (check_acl ($config['id_user'], 0, "AW")) { + $table->head[9] = __('delete'); +} $table->align[2] = "center"; $table->align[6] = "center"; $table->align[7] = "center"; @@ -495,9 +497,11 @@ else { $data[8] = '' . html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . ''; - $data[9] = '' . - html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))); + if (check_acl ($config['id_user'], 0, "AW")) { + $data[9] = '' . + html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))); + } } else { $data[8]= "N/A"; @@ -525,9 +529,11 @@ echo '
'; html_print_button(__('Export to CSV'), 'csv_export', false, "location.href='godmode/agentes/planned_downtime.export_csv.php?$filter_params_str'", 'class="sub next"'); echo '
'; echo ' '; -echo '
'; -html_print_submit_button (__('Create'), 'create', false, 'class="sub next"'); -echo '
'; +if (check_acl ($config['id_user'], 0, "AW")) { + echo '
'; + html_print_submit_button (__('Create'), 'create', false, 'class="sub next"'); + echo '
'; +} echo '';