Fixed modules tags acl with to tagged modules with an user without tags

This commit is contained in:
fermin831 2018-10-15 16:50:23 +02:00
parent f3c8b14b32
commit dd4e1c9994

View File

@ -1066,7 +1066,7 @@ function tags_check_acl_by_module($id_module = 0, $id_user = false,
// If user has not permission for this group,go to next group // If user has not permission for this group,go to next group
if (!isset($user_groups[$group])) continue; if (!isset($user_groups[$group])) continue;
// No tags means user can see all tags for this group // No tags means user can see all tags for this group
if (!isset($user_groups[$group]["tags"][$acl_column])) return true; if (empty($user_groups[$group]["tags"][$acl_column])) return true;
// Check acl // Check acl
$intersection = array_intersect($tags, $user_groups[$group]["tags"][$acl_column]); $intersection = array_intersect($tags, $user_groups[$group]["tags"][$acl_column]);
if(!empty($intersection)) return true; if(!empty($intersection)) return true;