Small admin fixes

This commit is contained in:
Dominic Ferrando
2025-04-24 20:49:57 -04:00
parent f8a8bf5b1b
commit e6e8b589c3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -310,7 +310,7 @@ func main() {
return
}
if isLocked {
if isLocked && !isAdmin(r) {
http.Error(w, "This thread is locked", http.StatusForbidden)
return
}
+1 -1
View File
@@ -216,7 +216,7 @@ templ Thread(board database.Board, thread database.Thread, posts []database.Post
<script src="/static/thread.js" defer></script>
@BoardHeader(board)
<div class="new-post-container">
if !thread.Locked {
if !thread.Locked || threadContext.IsAdmin {
@shared.NewPostForm(board, fmt.Sprintf("/%s/threads/%d", board.Slug, thread.Id), false)
}
</div>