Skip to content

Commit

Permalink
Fix: update_acl_rule() fixes (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamullen13316 authored Aug 9, 2024
1 parent 47858af commit a17f4fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "sophosfirewall-python"
packages = [
{ include = "sophosfirewall_python" },
]
version = "0.1.45"
version = "0.1.46"
description = "Python SDK for Sophos Firewall"
authors = ["Matt Mullen <[email protected]>"]
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions sophosfirewall_python/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ def update(self, name, description, source_zone, source_list, dest_list, service
"name": name,
"description": description,
"source_zone": source_zone,
"source_list": source_list,
"dest_list": dest_list,
"service_list": service_list,
"source_list": source_list if source_list else exist_sources,
"dest_list": dest_list if dest_list else exist_dests,
"service_list": service_list if service_list else exist_services,
"action": action
}
elif update_action == "remove":
Expand Down
2 changes: 2 additions & 0 deletions sophosfirewall_python/templates/updateserviceacl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
{% endif %}
</Hosts>
{% endif %}
{% if service_list %}
<Services>
{% for service in service_list %}
<Service>{{ service }}</Service>
{% endfor %}
</Services>
{% endif %}
<Action>{{ action | lower }}</Action>
</LocalServiceACL>
</Set>
Expand Down

0 comments on commit a17f4fd

Please sign in to comment.