mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-08 22:17:34 +01:00
Remove admin from being able to edit any comment
This commit is contained in:
parent
d5b8dd8909
commit
2fb2f1ae49
@ -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>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user