2013-07-29 Sergio Martin <sergio.martin@artica.es>

* 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



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8589 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-07-29 10:25:38 +00:00
parent c687dcf3be
commit d7005e29e5
3 changed files with 28 additions and 1 deletions

View File

@ -1,3 +1,15 @@
2013-07-29 Sergio Martin <sergio.martin@artica.es>
* 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 <junichi@rworks.jp>
* include/help/ja/help_field_match_snmp.php: Translated.

View File

@ -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.

View File

@ -452,6 +452,13 @@ switch ($action) {
if ($edit) {
if (!isset($table->head[$next])) {
$table->head[$next] = '<span title="Operations">' . __('Op.') . '</span>';
$table->size = array ();
$table->size[$next] = '80px';
$table->style[$next] = 'text-align:center;';
}
$data[$next] = '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit&pure='.$pure.'" style="display:inline">';
$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')));