Fixed bug permissions on filter events- 4278

This commit is contained in:
Tatiana Llorente 2019-08-20 13:42:04 +02:00
parent b390c6cb26
commit 38547052fb
3 changed files with 11 additions and 4 deletions

View File

@ -232,10 +232,17 @@ $table->data[0][0] = '<b>'.__('Filter name').'</b>';
$table->data[0][1] = html_print_input_text('id_name', $id_name, false, 20, 80, true);
$table->data[1][0] = '<b>'.__('Save in group').'</b>'.ui_print_help_tip(__('This group will be use to restrict the visibility of this filter with ACLs'), true);
$returnAllGroup = users_can_manage_group_all();
// If the user can't manage All group but the filter is for All group, the user should see All group in the select.
if ($returnAllGroup === false && $id_group_filter == 0) {
$returnAllGroup = true;
}
$table->data[1][1] = html_print_select_groups(
$config['id_user'],
$access,
users_can_manage_group_all(),
$returnAllGroup,
'id_group_filter',
$id_group_filter,
'',
@ -266,7 +273,6 @@ $table->data[2][1] = html_print_select_groups(
'',
true
);
$types = get_event_types();
// Expand standard array to add not_normal (not exist in the array, used only for searches)
$types['not_normal'] = __('Not normal');

View File

@ -93,10 +93,11 @@ if ($strict_acl) {
users_can_manage_group_all()
);
} else {
// All users should see the filters with the All group.
$groups_user = users_get_groups(
$config['id_user'],
$access,
users_can_manage_group_all(),
true,
true
);
}

View File

@ -3165,7 +3165,7 @@ function events_get_event_filter_select($manage=true)
} else {
$user_groups = users_get_groups(
$config['id_user'],
'EW',
'ER',
users_can_manage_group_all(),
true
);