diff --git a/src/forum.nim b/src/forum.nim index a880610..563db57 100644 --- a/src/forum.nim +++ b/src/forum.nim @@ -532,7 +532,7 @@ proc updateThread(c: TForumData, threadId: string, queryKeys: seq[string], query let threadAuthor = selectThreadAuthor(threadId.parseInt) # Verify that the current user has permissions to edit the specified thread. - let canEdit = c.rank == Admin or c.userid == threadAuthor.name + let canEdit = c.rank in {Admin, Moderator} or c.userid == threadAuthor.name if not canEdit: raise newForumError("You cannot edit this thread") diff --git a/src/frontend/user.nim b/src/frontend/user.nim index fe4efa7..4428aa4 100644 --- a/src/frontend/user.nim +++ b/src/frontend/user.nim @@ -75,4 +75,4 @@ when defined(js): title="User is a moderator") of Admin: italic(class="fas fa-chess-knight", - title="User is an admin") \ No newline at end of file + title="User is an admin")