From f52d02992e4a1fe402c3b6a5b0eb65b1da20707d Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 26 May 2016 17:22:18 +0200 Subject: [PATCH] Added change in pandora header, now users without PM permissions dont see warning incon. Ticket #3548 --- pandora_console/general/header.php | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index d868827229..bd2e0afe7c 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -231,7 +231,7 @@ config_check(); - + $pandora_management = check_acl($config['id_user'], 0, "PM"); if ($config["alert_cnt"] > 0) { echo ''; @@ -245,16 +245,26 @@ config_check(); $maintenance_link_open_img = ''; $maintenance_link_close = ''; - $maintenance_img = $maintenance_link_open_img . - html_print_image("images/header_yellow.png", - true, array( - "title" => __('You have %d warning(s)', - $config["alert_cnt"]), - "id" => "yougotalert", - "class" => "bot")) . $maintenance_link_close; + if (!$pandora_management) { + $maintenance_img = ''; + } + else { + $maintenance_img = $maintenance_link_open_img . + html_print_image("images/header_yellow.png", + true, array( + "title" => __('You have %d warning(s)', + $config["alert_cnt"]), + "id" => "yougotalert", + "class" => "bot")) . $maintenance_link_close; + } } else { - $maintenance_img = html_print_image ("images/header_ready.png", true, array ("title" => __('There are not warnings'), "id" => "yougotalert", "class" => "bot")); + if (!$pandora_management) { + $maintenance_img = ''; + } + else { + $maintenance_img = html_print_image ("images/header_ready.png", true, array ("title" => __('There are not warnings'), "id" => "yougotalert", "class" => "bot")); + } } $table->data[0][3] = $maintenance_img;