net/haproxy: fix ACL negation not working, fixes #30

This commit is contained in:
Frank Wall
2016-08-01 23:30:10 +02:00
parent a6a7395889
commit 58c7d7c6e6
@@ -43,7 +43,12 @@
{% for acl in action_data.linkedAcls.split(",") %}
{% set acl_data = helpers.getUUID(acl) %}
{% set acl_enabled = '1' %}
{% do action_acls.append('acl_' ~ acl_data.id) %}
{# # first check if this ACL condition should be negated #}
{% if acl_data.negate|default("") == '1' %}
{% do action_acls.append('!acl_' ~ acl_data.id) if acl_data.negate|default("") == '1' %}
{% else %}
{% do action_acls.append('acl_' ~ acl_data.id) %}
{% endif %}
{# # check if this ACL was already defined in this scope #}
{% if acl_data.id in acls_seen %}
{# # DEBUG: ignoring duplicate ACL {{acl_data.name}} #}