mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 14:37:36 +01:00
Fix package owners not being able to see review threads
This commit is contained in:
parent
ba08becd3a
commit
87af23248e
@ -695,7 +695,7 @@ class Thread(db.Model):
|
|||||||
elif type(perm) != Permission:
|
elif type(perm) != Permission:
|
||||||
raise Exception("Unknown permission given to Thread.checkPerm()")
|
raise Exception("Unknown permission given to Thread.checkPerm()")
|
||||||
|
|
||||||
isOwner = user == self.author
|
isOwner = user == self.author or (self.package is not None and self.package.author == user)
|
||||||
|
|
||||||
if perm == Permission.SEE_THREAD:
|
if perm == Permission.SEE_THREAD:
|
||||||
return not self.private or isOwner or user.rank.atLeast(UserRank.EDITOR)
|
return not self.private or isOwner or user.rank.atLeast(UserRank.EDITOR)
|
||||||
|
Loading…
Reference in New Issue
Block a user