From d9c904b0f4aee9588bd114b6e900b36a42a15908 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Thu, 12 Mar 2026 21:14:22 -0700 Subject: [PATCH] Update web UI to support all compile-time roles - Update knownRoles to include guest, viewer, editor, and commenter - Replace hardcoded role strings with model constants - Remove obsolete 'service' role from UI - All tests pass --- internal/ui/handlers_accounts.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/ui/handlers_accounts.go b/internal/ui/handlers_accounts.go index e4b1f4e..3c78823 100644 --- a/internal/ui/handlers_accounts.go +++ b/internal/ui/handlers_accounts.go @@ -15,7 +15,14 @@ import ( ) // knownRoles lists the built-in roles shown as checkboxes in the roles editor. -var knownRoles = []string{"admin", "user", "service"} +var knownRoles = []string{ + model.RoleAdmin, + model.RoleUser, + model.RoleGuest, + model.RoleViewer, + model.RoleEditor, + model.RoleCommenter, +} // handleAccountsList renders the accounts list page. func (u *UIServer) handleAccountsList(w http.ResponseWriter, r *http.Request) {