mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
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:
commit
c47b24d84c
@ -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[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);
|
$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(
|
$table->data[1][1] = html_print_select_groups(
|
||||||
$config['id_user'],
|
$config['id_user'],
|
||||||
$access,
|
$access,
|
||||||
users_can_manage_group_all(),
|
$returnAllGroup,
|
||||||
'id_group_filter',
|
'id_group_filter',
|
||||||
$id_group_filter,
|
$id_group_filter,
|
||||||
'',
|
'',
|
||||||
|
@ -93,10 +93,11 @@ if ($strict_acl) {
|
|||||||
users_can_manage_group_all()
|
users_can_manage_group_all()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
// All users should see the filters with the All group.
|
||||||
$groups_user = users_get_groups(
|
$groups_user = users_get_groups(
|
||||||
$config['id_user'],
|
$config['id_user'],
|
||||||
$access,
|
$access,
|
||||||
users_can_manage_group_all(),
|
true,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -3169,7 +3169,7 @@ function events_get_event_filter_select($manage=true)
|
|||||||
} else {
|
} else {
|
||||||
$user_groups = users_get_groups(
|
$user_groups = users_get_groups(
|
||||||
$config['id_user'],
|
$config['id_user'],
|
||||||
'EW',
|
'ER',
|
||||||
users_can_manage_group_all(),
|
users_can_manage_group_all(),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user