Fix package owners not being able to see review threads

This commit is contained in:
rubenwardy
2018-06-12 22:18:45 +01:00
parent ba08becd3a
commit 87af23248e

View File

@@ -695,7 +695,7 @@ class Thread(db.Model):
elif type(perm) != Permission:
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:
return not self.private or isOwner or user.rank.atLeast(UserRank.EDITOR)