aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-07-11 04:26:50 +0100
committerrubenwardy <rw@rubenwardy.com>2020-07-11 04:26:50 +0100
commit2fb2f1ae49e1e7e7069523f3d65f21a117571dd3 (patch)
tree0f5799da05a9e1635bf7087abea88ba095e71fca
parentd5b8dd89095d0d8ed91178f4ee23f610aa7b6917 (diff)
downloadcheatdb-2fb2f1ae49e1e7e7069523f3d65f21a117571dd3.tar.xz
Remove admin from being able to edit any comment
-rw-r--r--app/flatpages/help/ranks_permissions.md4
-rw-r--r--app/models.py3
2 files changed, 3 insertions, 4 deletions
diff --git a/app/flatpages/help/ranks_permissions.md b/app/flatpages/help/ranks_permissions.md
index 972c570..94af9a3 100644
--- a/app/flatpages/help/ranks_permissions.md
+++ b/app/flatpages/help/ranks_permissions.md
@@ -206,7 +206,7 @@ title: Ranks and Permissions
</tr>
<tr>
<td>Edit Comments</td>
- <th>✓</th> <!-- new -->
+ <th></th> <!-- new -->
<th></th>
<th>✓</th> <!-- member -->
<th></th>
@@ -217,7 +217,7 @@ title: Ranks and Permissions
<th>✓</th> <!-- moderator -->
<th></th>
<th>✓</th> <!-- admin -->
- <th>✓</th>
+ <th></th>
</tr>
<tr>
<td>Set Email</td>
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