From 3ab3b046433ebe55f00e31ea6e5e6a9a56edb27a Mon Sep 17 00:00:00 2001 From: chelsea Date: Sat, 11 Oct 2025 22:08:42 -0500 Subject: [PATCH] Clean up redundant authentication checks in dashboard template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed redundant current_user.is_authenticated checks in the else block of the navigation menu. The else block only executes for authenticated users per app.py logic (line 278 vs 293), so the nested checks were dead code that created confusion. Changes: - Removed defensive checks for unauthenticated users in authenticated block - Added clarifying comment about when else block executes - Simplified template logic for better maintainability - Removed dead code paths (Anonymous User label, ? avatar) Addresses concerns raised in Issue #2 about confusing template logic. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- templates/dashboard.html | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/templates/dashboard.html b/templates/dashboard.html index 4080cfc..18a64db 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -27,24 +27,17 @@ 📝 Sign Up {% else %} + {# This block only executes for authenticated users (per app.py line 278) #}