From f42e57efbe96a79158db1d0d602ebaee63900bec Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 6 Oct 2021 17:11:45 +0200 Subject: [PATCH 1/3] show only events filter in acl groups --- pandora_console/operation/users/user_edit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index b97cb6d83a..c18c8a103e 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -438,8 +438,9 @@ if (isset($double_authentication)) { if (check_acl($config['id_user'], 0, 'ER')) { $event_filter = '

'.__('Event filter').'

'; + $user_groups = implode(',', array_keys((users_get_groups($config['id_user'], 'AR', $display_all_group)))); $event_filter .= html_print_select_from_sql( - 'SELECT id_filter, id_name FROM tevent_filter', + 'SELECT id_filter, id_name FROM tevent_filter WHERE id_group_filter IN ('.$user_groups.')', 'event_filter', $user_info['default_event_filter'], '', From f55a6685bd2ff45ce9f2c30c864f2956ca12d45f Mon Sep 17 00:00:00 2001 From: marcos Date: Thu, 7 Oct 2021 14:09:02 +0200 Subject: [PATCH 2/3] show only events filter in acl groups --- pandora_console/godmode/users/configure_user.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index f362b1a973..45227e9f20 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -1226,7 +1226,9 @@ $session_time .= html_print_input_text( 'class="input_line_small"' ).'
'; -$event_filter_data = db_get_all_rows_sql('SELECT id_name, id_filter FROM tevent_filter'); +$user_groups = implode(',', array_keys((users_get_groups($config['id_user'], 'AR', $display_all_group)))); + +$event_filter_data = db_get_all_rows_sql('SELECT id_name, id_filter FROM tevent_filter WHERE id_group_filter IN ('.$user_groups.')'); if ($event_filter_data === false) { $event_filter_data = []; } From d4108c4e8bc78480074c890391f50f6506cd640e Mon Sep 17 00:00:00 2001 From: marcos Date: Thu, 7 Oct 2021 16:11:23 +0200 Subject: [PATCH 3/3] show only events fetch with user groups --- pandora_console/godmode/users/configure_user.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 45227e9f20..2757af500e 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -721,6 +721,7 @@ if ($update_user) { ); } + if ($values['strict_acl']) { $count_groups = 0; $count_tags = 0; @@ -1226,7 +1227,8 @@ $session_time .= html_print_input_text( 'class="input_line_small"' ).''; -$user_groups = implode(',', array_keys((users_get_groups($config['id_user'], 'AR', $display_all_group)))); + +$user_groups = implode(',', array_keys((users_get_groups($id, 'AR', $display_all_group)))); $event_filter_data = db_get_all_rows_sql('SELECT id_name, id_filter FROM tevent_filter WHERE id_group_filter IN ('.$user_groups.')'); if ($event_filter_data === false) {