From 4b098bea157110852ba9b9e963c93f0b9f9fe58c Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 6 Apr 2021 00:44:01 -0400 Subject: [PATCH] fix navbar showing user info even when not logged in --- archivebox/templates/core/navigation.html | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/archivebox/templates/core/navigation.html b/archivebox/templates/core/navigation.html index 27330f1c..90542f9f 100644 --- a/archivebox/templates/core/navigation.html +++ b/archivebox/templates/core/navigation.html @@ -9,14 +9,18 @@ Public | Admin     - {% block welcome-msg %} - {% trans 'User' %} - {% firstof user.get_short_name user.get_username %}     - {% endblock %} - {% block userlinks %} - {% if user.has_usable_password %} - Account / - {% endif %} - {% trans 'Log out' %} - {% endblock %} + {% if user.is_authenticated %} + {% block welcome-msg %} + {% trans 'User' %} + {% firstof user.get_short_name user.get_username %}     + {% endblock %} + {% block userlinks %} + {% if user.has_usable_password %} + Account / + {% endif %} + {% trans 'Log out' %} + {% endblock %} + {% else %} + {% trans 'Log in' %} + {% endif %}