]> git.lizzy.rs Git - cheatdb.git/blobdiff - app/models.py
Remove admin from being able to edit any comment
[cheatdb.git] / app / models.py
index 4ab44126584100649331ed008a064ba1c44326ea..58cf99201978476a325a8680875bc0cdef505eb5 100644 (file)
@@ -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