From 3784181e4fad3c947dfa95081d8a0b34f5be12d4 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Wed, 11 Dec 2024 18:10:12 +0100 Subject: feat: Disable auth if passphrase is empty Disable all auth mechanism when passphrase is empty. That will allow for a simpler setup. --- templates/base.qtpl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'templates/base.qtpl') diff --git a/templates/base.qtpl b/templates/base.qtpl index 2a42cb8..db9deee 100644 --- a/templates/base.qtpl +++ b/templates/base.qtpl @@ -38,6 +38,13 @@ Page { } %} + +{% code func IsAuthenticationDisabled(ctx context.Context) bool { + t, ok := ctx.Value("disableAuthentication").(bool) + return ok && t + } +%} + {% code func IsLoggedIn(ctx context.Context) bool { t, ok := ctx.Value("logged").(bool) return ok && t -- cgit v1.2.3