moderators should be able to edit categories (#255)
This commit is contained in:
parent
030c52020e
commit
6e32ec27b4
2 changed files with 2 additions and 2 deletions
|
|
@ -532,7 +532,7 @@ proc updateThread(c: TForumData, threadId: string, queryKeys: seq[string], query
|
||||||
let threadAuthor = selectThreadAuthor(threadId.parseInt)
|
let threadAuthor = selectThreadAuthor(threadId.parseInt)
|
||||||
|
|
||||||
# Verify that the current user has permissions to edit the specified thread.
|
# 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:
|
if not canEdit:
|
||||||
raise newForumError("You cannot edit this thread")
|
raise newForumError("You cannot edit this thread")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,4 +75,4 @@ when defined(js):
|
||||||
title="User is a moderator")
|
title="User is a moderator")
|
||||||
of Admin:
|
of Admin:
|
||||||
italic(class="fas fa-chess-knight",
|
italic(class="fas fa-chess-knight",
|
||||||
title="User is an admin")
|
title="User is an admin")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue