Merge branch '1478-Filtro-para-consolas-visuales-dev' into 'develop'

Fixed issue in filter visual console

See merge request artica/pandorafms!947
This commit is contained in:
vgilc 2017-10-23 15:44:08 +02:00
commit d443bc03ab
1 changed files with 5 additions and 1 deletions

View File

@ -2800,7 +2800,11 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
$groups = users_get_groups ($id_user, 'VR'); $groups = users_get_groups ($id_user, 'VR');
} else { } else {
if(!empty($filter['group'])){ if(!empty($filter['group'])){
$groups = $filter['group']; $permissions_group = users_get_groups ($id_user, 'VR', false);
if(empty($permissions_group)){
$permissions_group = users_get_groups ($id_user, 'VM', false);
}
$groups = array_intersect_key($filter['group'], $permissions_group);
unset($filter['group']); unset($filter['group']);
} else { } else {
$groups = users_get_groups ($id_user, 'VR', false); $groups = users_get_groups ($id_user, 'VR', false);