Small admin fixes
This commit is contained in:
+1
-1
@@ -310,7 +310,7 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if isLocked {
|
if isLocked && !isAdmin(r) {
|
||||||
http.Error(w, "This thread is locked", http.StatusForbidden)
|
http.Error(w, "This thread is locked", http.StatusForbidden)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ templ Thread(board database.Board, thread database.Thread, posts []database.Post
|
|||||||
<script src="/static/thread.js" defer></script>
|
<script src="/static/thread.js" defer></script>
|
||||||
@BoardHeader(board)
|
@BoardHeader(board)
|
||||||
<div class="new-post-container">
|
<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)
|
@shared.NewPostForm(board, fmt.Sprintf("/%s/threads/%d", board.Slug, thread.Id), false)
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user