moderators should be able to edit categories (#255)

This commit is contained in:
Miran 2020-08-24 13:48:23 +02:00 • committed by GitHub
commit 6e32ec27b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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")

View file

@ -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")
title="User is an admin")