mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Allow moderators to edit ThreadReplies
This commit is contained in:
parent
97e2e1c16e
commit
fe2d08c395
@ -137,7 +137,7 @@ class ThreadReply(db.Model):
|
|||||||
raise Exception("Unknown permission given to ThreadReply.checkPerm()")
|
raise Exception("Unknown permission given to ThreadReply.checkPerm()")
|
||||||
|
|
||||||
if perm == Permission.EDIT_REPLY:
|
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:
|
elif perm == Permission.DELETE_REPLY:
|
||||||
return user.rank.atLeast(UserRank.MODERATOR) and self.thread.replies[0] != self
|
return user.rank.atLeast(UserRank.MODERATOR) and self.thread.replies[0] != self
|
||||||
|
Loading…
Reference in New Issue
Block a user