diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4dc991a700..d10afeb40b 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2011-02-17 Ramon Novoa <rnovoa@artica.es> + + * include/functions.php: Hide custom SQL reports from non PM users + when creating reports. + 2011-02-17 Miguel de Dios <miguel.dedios@artica.es> * images/os_icons/android_small.png, diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 6d45f1b908..66c0268c1e 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -647,11 +647,16 @@ function get_report_types () { $types['min_value'] = __('Min. Value'); $types['sumatory'] = __('Summatory'); //$types['agent_detailed'] = __('Agent detailed view'); - $types['text'] = __('Text'); - $types['sql'] = __('SQL query'); - $types['sql_graph_vbar'] = __('SQL vertical bar graph'); - $types['sql_graph_pie'] = __('SQL pie graph'); - $types['sql_graph_hbar'] = __('SQL horizonal bar graph'); + $types['text'] = __ ('Text'); + + # Only pandora managers have access to the whole database + if (give_acl ($config['id_user'], 0, "PM")) { + $types['sql'] = __('SQL query'); + $types['sql_graph_vbar'] = __('SQL vertical bar graph'); + $types['sql_graph_pie'] = __('SQL pie graph'); + $types['sql_graph_hbar'] = __('SQL horizonal bar graph'); + } + $types['url'] = __('Import text from URL'); $types['database_serialized'] = __('Serialize data'); $types['TTRT'] = __('TTRT');