From 68ae6e3112efd7e14b2c2f19830d974d888ef959 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Tue, 12 Jun 2018 13:06:42 +0200 Subject: [PATCH] Always group All in custom reports and custom graphs --- pandora_console/godmode/reporting/graph_builder.main.php | 5 ++--- pandora_console/godmode/reporting/graphs.php | 5 ++--- pandora_console/godmode/reporting/reporting_builder.main.php | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pandora_console/godmode/reporting/graph_builder.main.php b/pandora_console/godmode/reporting/graph_builder.main.php index a66dc235cd..b441aeda14 100644 --- a/pandora_console/godmode/reporting/graph_builder.main.php +++ b/pandora_console/godmode/reporting/graph_builder.main.php @@ -116,13 +116,12 @@ if ($edit_graph) { echo ">"; $own_info = get_user_info ($config['id_user']); -$return_all_groups = $own_info['is_admin'] || users_can_manage_group_all("RR"); echo "".__('Group').""; if (check_acl ($config['id_user'], 0, "RW")) - echo html_print_select_groups($config['id_user'], 'RW', $return_all_groups, 'graph_id_group', $id_group, '', '', '', true); + echo html_print_select_groups($config['id_user'], 'RW', true, 'graph_id_group', $id_group, '', '', '', true); elseif (check_acl ($config['id_user'], 0, "RM")) - echo html_print_select_groups($config['id_user'], 'RM', $return_all_groups, 'graph_id_group', $id_group, '', '', '', true); + echo html_print_select_groups($config['id_user'], 'RM', true, 'graph_id_group', $id_group, '', '', '', true); echo ""; echo ""; echo "".__('Description').""; diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index 5b5657007b..1bf6548245 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -32,7 +32,6 @@ if (!$report_r && !$report_w && !$report_m) { } $access = ($report_r == true) ? 'RR' : (($report_w == true) ? 'RW' : (($report_m == true) ? 'RM' : 'RR')); -$manage_group_all = users_can_manage_group_all($access); $activeTab = get_parameter('tab', 'main'); @@ -189,14 +188,14 @@ if (!empty ($graphs)) { $data[3] = ui_print_group_icon($graph['id_group'],true); $data[4] = ''; - if (($report_w || $report_m) && $manage_group_all) { + if (($report_w || $report_m)) { $data[4] = ''.html_print_image("images/config.png", true).''; } $data[4] .= ' '; - if ($report_m && $manage_group_all) { + if ($report_m) { $data[4] .= '' . html_print_image("images/cross.png", true, array('alt' => __('Delete'), 'title' => __('Delete'))) . '' . diff --git a/pandora_console/godmode/reporting/reporting_builder.main.php b/pandora_console/godmode/reporting/reporting_builder.main.php index 37e32d8621..05cb417933 100755 --- a/pandora_console/godmode/reporting/reporting_builder.main.php +++ b/pandora_console/godmode/reporting/reporting_builder.main.php @@ -69,7 +69,7 @@ $table->data['name'][1] = html_print_input_text('name', $reportName, $table->data['group'][0] = __('Group'); $write_groups = users_get_groups_for_select(false, "RW", - users_can_manage_group_all("RW"), true, false, 'id_grupo'); + true, true, false, 'id_grupo'); // If the report group is not among the RW groups (special permission) we add it if (!isset($write_groups[$idGroupReport]) && $idGroupReport) {