diff --git a/pkg/controller/forum/manage.go b/pkg/controller/forum/manage.go index 9c2e941..7540a1c 100644 --- a/pkg/controller/forum/manage.go +++ b/pkg/controller/forum/manage.go @@ -65,7 +65,13 @@ func Manage() http.HandlerFunc { } pager.ParsePage(r) - forums, err := models.PaginateOwnedForums(currentUser.ID, currentUser.IsAdmin, categories, search, pager) + forums, err := models.PaginateOwnedForums( + currentUser.ID, + currentUser.HasAdminScope(config.ScopeForumAdmin), + categories, + search, + pager, + ) if err != nil { session.FlashError(w, r, "Couldn't paginate owned forums: %s", err) templates.Redirect(w, "/") diff --git a/pkg/controller/forum/moderators.go b/pkg/controller/forum/moderators.go index 1f0a847..3c6e409 100644 --- a/pkg/controller/forum/moderators.go +++ b/pkg/controller/forum/moderators.go @@ -215,8 +215,6 @@ func ModerateThread() http.HandlerFunc { case "unpin": thread.Pinned = false session.Flash(w, r, "This thread will no longer be pinned to the top of the forum.") - default: - session.FlashError(w, r, "Unknown moderator action.") } // Save changes to the thread.