Fixed bug in pandorafms

This commit is contained in:
manuel.montes 2018-06-11 17:42:12 +02:00
parent 5e1c88cd45
commit bcd937b1ba
2 changed files with 9 additions and 8 deletions

View File

@ -126,16 +126,11 @@ else {
} }
$table->data[1][0] = __('Group:'); $table->data[1][0] = __('Group:');
$groups = users_get_groups ($config['id_user'], 'RW');
$own_info = get_user_info($config['id_user']);
// Only display group "All" if user is administrator // Only display group "All" if user is administrator
// or has "RW" privileges // or has "RW" privileges
if ($own_info['is_admin'] || $vconsole_write || $vconsole_manage)
$display_all_group = true;
else
$display_all_group = false;
$display_all_group = (users_is_admin() || users_can_manage_group_all("RW"));
$table->data[1][1] = html_print_select_groups($config['id_user'], "RW", $table->data[1][1] = html_print_select_groups($config['id_user'], "RW",
$display_all_group, 'id_group', $idGroup, '', '', '', true); $display_all_group, 'id_group', $idGroup, '', '', '', true);
$backgrounds_list = list_files( $backgrounds_list = list_files(

View File

@ -222,8 +222,14 @@ else {
$table->data[0][1] = html_print_input_text ('name', $name, '', 30, $table->data[0][1] = html_print_input_text ('name', $name, '', 30,
100,true); 100,true);
$table->data[1][0] = __('Group'); $table->data[1][0] = __('Group');
$table->data[1][1] = html_print_select_groups(false, "AR", true,
'id_group', $id_group, '', '', 0, true); // Only display group "All" if user is administrator
// or has "AR" privileges
$display_all_group = (users_is_admin() || users_can_manage_group_all("AR"));
$table->data[1][1] = html_print_select_groups($config['id_user'], "AR",
$display_all_group, 'id_group', $idGroup, '', '', '', true);
$table->data[2][0] = __('Node radius'); $table->data[2][0] = __('Node radius');
$table->data[2][1] = html_print_input_text ('node_radius', $node_radius, '', 2, $table->data[2][1] = html_print_input_text ('node_radius', $node_radius, '', 2,