Event ACL check: Fix case multiple tags
This commit is contained in:
parent
33089f2ff2
commit
49f1ad38e7
|
@ -1481,10 +1481,20 @@ function tags_checks_event_acl($id_user, $id_group, $access, $tags = array(), $c
|
|||
}
|
||||
$group_ids = implode(',', $childrens_ids);
|
||||
}
|
||||
$tag_conds = "";
|
||||
|
||||
if(!empty($tags_str)) {
|
||||
$tag_conds = " AND (tags IN ('$tags_str') OR tags = '') ";
|
||||
}
|
||||
else {
|
||||
$tag_conds = " AND tags = '' ";
|
||||
}
|
||||
|
||||
$sql = "SELECT id_usuario FROM tusuario_perfil
|
||||
WHERE id_usuario = '".$config["id_user"]."' AND (tags IN ($tags_str) OR tags = '')
|
||||
AND id_perfil IN (SELECT id_perfil FROM tperfil WHERE ".get_acl_column($access)."=1)
|
||||
AND id_grupo IN ($group_ids)";
|
||||
WHERE id_usuario = '".$config["id_user"]."' $tag_conds
|
||||
AND id_perfil IN (SELECT id_perfil FROM tperfil WHERE ".get_acl_column($access)."=1)
|
||||
AND id_grupo IN ($group_ids)";
|
||||
|
||||
$has_perm = db_get_value_sql ($sql);
|
||||
|
||||
if ($has_perm) {
|
||||
|
|
Loading…
Reference in New Issue