mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed the view of list event filters with a user is setted strict_acl. #2017
This commit is contained in:
parent
4d70cdd24a
commit
118b980f4e
@ -1583,11 +1583,24 @@ function events_get_event_filter ($id_filter, $filter = false, $fields = false)
|
||||
function events_get_event_filter_select($manage = true) {
|
||||
global $config;
|
||||
|
||||
$user_groups = users_get_groups ($config['id_user'], "EW", $manage, true);
|
||||
$strict_acl = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']);
|
||||
|
||||
if ($strict_acl) {
|
||||
$user_groups = users_get_strict_mode_groups($config['id_user'],
|
||||
users_can_manage_group_all());
|
||||
}
|
||||
else {
|
||||
$user_groups = users_get_groups ($config['id_user'], "EW",
|
||||
users_can_manage_group_all(), true);
|
||||
}
|
||||
|
||||
if(empty($user_groups)) {
|
||||
return array();
|
||||
}
|
||||
$sql = "SELECT id_filter, id_name FROM tevent_filter WHERE id_group IN (".implode(',', array_keys ($user_groups)).")";
|
||||
$sql = "
|
||||
SELECT id_filter, id_name
|
||||
FROM tevent_filter
|
||||
WHERE id_group IN (" . implode(',', array_keys ($user_groups)) . ")";
|
||||
|
||||
$event_filters = db_get_all_rows_sql($sql);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user