diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php index b2b9763d56..47c15419c9 100644 --- a/pandora_console/godmode/events/event_edit_filter.php +++ b/pandora_console/godmode/events/event_edit_filter.php @@ -232,10 +232,17 @@ $table->data[0][0] = ''.__('Filter name').''; $table->data[0][1] = html_print_input_text('id_name', $id_name, false, 20, 80, true); $table->data[1][0] = ''.__('Save in group').''.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'); diff --git a/pandora_console/godmode/events/event_filter.php b/pandora_console/godmode/events/event_filter.php index 60ba973996..c9c3f7f226 100644 --- a/pandora_console/godmode/events/event_filter.php +++ b/pandora_console/godmode/events/event_filter.php @@ -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 ); } diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index ca94a9de5c..7a6ad5e34c 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -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 );