From e6e8b589c3e14a1e6b75aa018e3d72533ec25787 Mon Sep 17 00:00:00 2001 From: Dominic Ferrando Date: Thu, 24 Apr 2025 20:49:57 -0400 Subject: [PATCH] Small admin fixes --- web/main.go | 2 +- web/views/thread.templ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/main.go b/web/main.go index fd88203..609a3eb 100644 --- a/web/main.go +++ b/web/main.go @@ -310,7 +310,7 @@ func main() { return } - if isLocked { + if isLocked && !isAdmin(r) { http.Error(w, "This thread is locked", http.StatusForbidden) return } diff --git a/web/views/thread.templ b/web/views/thread.templ index a8e6dee..2820a5b 100644 --- a/web/views/thread.templ +++ b/web/views/thread.templ @@ -216,7 +216,7 @@ templ Thread(board database.Board, thread database.Thread, posts []database.Post @BoardHeader(board)
- if !thread.Locked { + if !thread.Locked || threadContext.IsAdmin { @shared.NewPostForm(board, fmt.Sprintf("/%s/threads/%d", board.Slug, thread.Id), false) }