From 2fb2f1ae49e1e7e7069523f3d65f21a117571dd3 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 11 Jul 2020 04:26:50 +0100 Subject: Remove admin from being able to edit any comment --- app/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/models.py') diff --git a/app/models.py b/app/models.py index 4ab4412..58cf992 100644 --- a/app/models.py +++ b/app/models.py @@ -1148,8 +1148,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) or \ - user.rank.atLeast(UserRank.ADMIN) + return user == self.author and user.rank.atLeast(UserRank.MEMBER) and not self.thread.locked elif perm == Permission.DELETE_REPLY: return user.rank.atLeast(UserRank.MODERATOR) and self.thread.replies[0] != self -- cgit v1.2.3