From fe2d08c39598e0c2bc4770d107a6376e9c22fc5f Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 21 Jan 2022 14:30:12 +0000 Subject: [PATCH] Allow moderators to edit ThreadReplies --- app/models/threads.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/threads.py b/app/models/threads.py index 5e987b2..02bcf50 100644 --- a/app/models/threads.py +++ b/app/models/threads.py @@ -137,7 +137,7 @@ class ThreadReply(db.Model): raise Exception("Unknown permission given to ThreadReply.checkPerm()") if perm == Permission.EDIT_REPLY: - return user == self.author and user.rank.atLeast(UserRank.MEMBER) and not self.thread.locked + return user.rank.atLeast(UserRank.MEMBER if user == self.author else UserRank.MODERATOR) and not self.thread.locked elif perm == Permission.DELETE_REPLY: return user.rank.atLeast(UserRank.MODERATOR) and self.thread.replies[0] != self