aboutsummaryrefslogtreecommitdiff
path: root/templates/base.qtpl
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-12-11 18:10:12 +0100
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-12-11 18:10:12 +0100
commit3784181e4fad3c947dfa95081d8a0b34f5be12d4 (patch)
tree48263aa693149f997cdd7ac0c51bf0f994743748 /templates/base.qtpl
parent57efc8d2173fdff1ef99157a2633d3f1d366a290 (diff)
downloadcerrado-3784181e4fad3c947dfa95081d8a0b34f5be12d4.tar.gz
cerrado-3784181e4fad3c947dfa95081d8a0b34f5be12d4.tar.bz2
cerrado-3784181e4fad3c947dfa95081d8a0b34f5be12d4.zip
feat: Disable auth if passphrase is empty
Disable all auth mechanism when passphrase is empty. That will allow for a simpler setup.
Diffstat (limited to 'templates/base.qtpl')
-rw-r--r--templates/base.qtpl7
1 files changed, 7 insertions, 0 deletions
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