diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 7242a83e44..cc898486a6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2013-07-29 Sergio Martin + + * godmode/reporting/reporting_builder.main.php + godmode/reporting/reporting_builder.php: Added the report + group to the group combo in the main edition screen of this + report when the user hasnt permissions on this groups but + this report have special permissions to edit by this group + bug: #2362 + + Fix a header layout in reports edit view when only have permission + to edit extrapermission reports + 2013-07-28 Junichi Satoh * include/help/ja/help_field_match_snmp.php: Translated. diff --git a/pandora_console/godmode/reporting/reporting_builder.main.php b/pandora_console/godmode/reporting/reporting_builder.main.php index 70582567d9..cd9905c2ba 100644 --- a/pandora_console/godmode/reporting/reporting_builder.main.php +++ b/pandora_console/godmode/reporting/reporting_builder.main.php @@ -57,8 +57,16 @@ $table->data['name'][1] = html_print_input_text('name', $reportName, __('Name'), 80, 100, true); $table->data['group'][0] = __('Group'); -$table->data['group'][1] = html_print_select_groups(false, "RW", users_can_manage_group_all(), 'id_group', $idGroupReport, false, '', '', true); +$write_groups = users_get_groups_for_select(false, "RW", users_can_manage_group_all(), true, false, 'id_grupo'); + +// If the report group is not among the RW groups (special permission) we add it +if (!isset($write_groups[$idGroupReport])) { + $write_groups[$idGroupReport] = groups_get_name($idGroupReport); +} + +$table->data['group'][1] = html_print_select ($write_groups, 'id_group', $idGroupReport, false, '', '', true); + if ($report_id_user == $config['id_user'] || is_user_admin ($config["id_user"])) { //S/he is the creator of report (or admin) and s/he can change the access. diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 11e0a2b823..8fbccdcff1 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -452,6 +452,13 @@ switch ($action) { if ($edit) { + if (!isset($table->head[$next])) { + $table->head[$next] = '' . __('Op.') . ''; + $table->size = array (); + $table->size[$next] = '80px'; + $table->style[$next] = 'text-align:center;'; + } + $data[$next] = '
'; $data[$next] .= html_print_input_hidden ('id_report', $report['id_report'], true); $data[$next] .= html_print_input_image ('edit', 'images/config.png', 1, '', true, array ('title' => __('Edit')));