From f8eaca1b08da48b698eed568f908d6b4bb3034d8 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Mon, 26 Jan 2026 16:56:22 -0500 Subject: [PATCH] feat: Add role-based frontend controls - Update User type to include role field - Modify dashboard template to conditionally show admin links - Add protected dashboard route with user context - Update main.go to serve dashboard with proper authentication --- templates/dashboard.templ | 4 +++- templates/types.go | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/dashboard.templ b/templates/dashboard.templ index a2d4c47..fc7c168 100644 --- a/templates/dashboard.templ +++ b/templates/dashboard.templ @@ -80,7 +80,9 @@ templ Dashboard(user User) {
Dashboard - Admin + if user.Role == "admin" { + Admin + } Welcome, { user.Username }!