From 52c32b473d32ac4951ce5c2d2b3ee0de38966f2c Mon Sep 17 00:00:00 2001 From: Matthew Kilpatrick <16194494+Matthew-Kilpatrick@users.noreply.github.com> Date: Fri, 15 May 2026 18:55:46 +0000 Subject: [PATCH] fix: omit "Access rules" directives if no rules configured When an access list was associated with a template which had users (items) but no rules (clients), a `deny all` directive was inserted to the config. This resulted in all requests, including those with valid credentials, being rejected due to the lack of any `allow` directive. This commit wraps the access rule configuration inside of an if block, so the `deny all;` directive is only present when at least one rule is configured. --- backend/templates/_access.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/templates/_access.conf b/backend/templates/_access.conf index 4f3885451..81983f3a3 100644 --- a/backend/templates/_access.conf +++ b/backend/templates/_access.conf @@ -10,11 +10,13 @@ {% endif %} + {% if access_list.clients.length > 0 %} # Access Rules: {{ access_list.clients | size }} total {% for client in access_list.clients %} {{client | nginxAccessRule}} {% endfor %} deny all; + {% endif %} # Access checks must... {% if access_list.satisfy_any == 1 or access_list.satisfy_any == true %}