Merge branch 'ent-4278-Bug-ACL-al-cargar-o-gestionar-filtros-de-eventos' into 'develop'

Fixed bug permissions on filter events- 4278

See merge request artica/pandorafms!2671
This commit is contained in:
Daniel Rodriguez 2019-08-30 16:07:45 +02:00
commit c47b24d84c
3 changed files with 11 additions and 3 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,
'',

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

@ -3169,7 +3169,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
);