diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index dd3b22028f..2557ae3db2 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1810,7 +1810,7 @@ function check_acl($id_user, $id_group, $access, $onlyOneGroup = false) { } if ($id_group != 0 || $onlyOneGroup === true) { - $groups_list_acl = users_get_groups ($id_user, 'AR', false, true, null); + $groups_list_acl = users_get_groups ($id_user, $access, false, true, null); } else{ $groups_list_acl = get_users_acl($id_user); diff --git a/pandora_console/include/functions_tags.php b/pandora_console/include/functions_tags.php index 622814ef7f..20238c8b23 100644 --- a/pandora_console/include/functions_tags.php +++ b/pandora_console/include/functions_tags.php @@ -1432,8 +1432,12 @@ function tags_checks_event_acl($id_user, $id_group, $access, $tags = array(), $c AND id_perfil IN ( SELECT id_perfil FROM tperfil - WHERE ".get_acl_column($access)." = 1) - AND id_grupo = ".$id_group; + WHERE ".get_acl_column($access)." = 1)"; + + if(isset($id_group)){ + $sql .= "AND id_grupo = ".$id_group; + } + $user_has_perm_without_tags = db_get_all_rows_sql ($sql); if ($user_has_perm_without_tags) {