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) }