Merge branch '2173-REDIRIS-Desplegable-de-grupo-All-en-grupos-pandorafms' into 'develop'
Remove the 'All Groups' option in non-administrators users See merge request artica/pandorafms!1590
This commit is contained in:
commit
128d3178c8
|
@ -224,9 +224,9 @@ $table->data[1][1] = html_print_select_groups(
|
||||||
'', false, '', false, false, 'id_grupo', $strict_user);
|
'', false, '', false, false, 'id_grupo', $strict_user);
|
||||||
|
|
||||||
$table->data[2][0] = '<b>' . __('Group').'</b>';
|
$table->data[2][0] = '<b>' . __('Group').'</b>';
|
||||||
$table->data[2][1] = html_print_select_groups($config["id_user"], $access,
|
$display_all_group = (users_is_admin() || users_can_manage_group_all("AR"));
|
||||||
true, 'id_group', $id_group, '', '', -1, true, false, false, '',
|
$table->data[2][1] = html_print_select_groups($config['id_user'], "AR",
|
||||||
false, false, false, false, 'id_grupo', $strict_user);
|
$display_all_group, 'id_group', $idGroup, '', '', '', true);
|
||||||
|
|
||||||
$types = get_event_types ();
|
$types = get_event_types ();
|
||||||
// Expand standard array to add not_normal (not exist in the array, used only for searches)
|
// Expand standard array to add not_normal (not exist in the array, used only for searches)
|
||||||
|
|
|
@ -119,9 +119,9 @@ $own_info = get_user_info ($config['id_user']);
|
||||||
|
|
||||||
echo "<td><b>".__('Group')."</b></td><td>";
|
echo "<td><b>".__('Group')."</b></td><td>";
|
||||||
if (check_acl ($config['id_user'], 0, "RW"))
|
if (check_acl ($config['id_user'], 0, "RW"))
|
||||||
echo html_print_select_groups($config['id_user'], 'RW', true, 'graph_id_group', $id_group, '', '', '', true);
|
echo html_print_select_groups($config['id_user'], 'RW', $display_all_group, 'graph_id_group', $id_group, '', '', '', true);
|
||||||
elseif (check_acl ($config['id_user'], 0, "RM"))
|
elseif (check_acl ($config['id_user'], 0, "RM"))
|
||||||
echo html_print_select_groups($config['id_user'], 'RM', true, 'graph_id_group', $id_group, '', '', '', true);
|
echo html_print_select_groups($config['id_user'], 'RM', $display_all_group, 'graph_id_group', $id_group, '', '', '', true);
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td class='datos2'><b>".__('Description')."</b></td>";
|
echo "<td class='datos2'><b>".__('Description')."</b></td>";
|
||||||
|
|
|
@ -67,10 +67,14 @@ $table->data['name'][1] = html_print_input_text('name', $reportName,
|
||||||
__('Name'), 80, 100, true, false, true);
|
__('Name'), 80, 100, true, false, true);
|
||||||
|
|
||||||
$table->data['group'][0] = __('Group');
|
$table->data['group'][0] = __('Group');
|
||||||
|
$display_all_group = (users_is_admin() || users_can_manage_group_all("AR"));
|
||||||
|
$write_groups = users_get_groups_for_select(false, "AR", $display_all_group, true, false, 'id_grupo');
|
||||||
|
|
||||||
$write_groups = users_get_groups_for_select(false, "RW",
|
|
||||||
true, true, false, 'id_grupo');
|
|
||||||
|
|
||||||
|
html_print_select_groups($config['id_user'], "AR",
|
||||||
|
$display_all_group, 'id_group', $idGroup, '', '', '', true);
|
||||||
|
|
||||||
|
|
||||||
// If the report group is not among the RW groups (special permission) we add it
|
// If the report group is not among the RW groups (special permission) we add it
|
||||||
if (!isset($write_groups[$idGroupReport]) && $idGroupReport) {
|
if (!isset($write_groups[$idGroupReport]) && $idGroupReport) {
|
||||||
$write_groups[$idGroupReport] = groups_get_name($idGroupReport);
|
$write_groups[$idGroupReport] = groups_get_name($idGroupReport);
|
||||||
|
|
Loading…
Reference in New Issue