Fix editors not being able to approve releases
This commit is contained in:
parent
c0719fdeaa
commit
a33a4bd894
|
@ -913,8 +913,9 @@ class PackageRelease(db.Model):
|
|||
|
||||
return count > 0
|
||||
elif perm == Permission.APPROVE_RELEASE:
|
||||
return isMaintainer and user.rank.atLeast(
|
||||
UserRank.MEMBER if self.approved else UserRank.NEW_MEMBER)
|
||||
return user.rank.atLeast(UserRank.EDITOR) or \
|
||||
(isMaintainer and user.rank.atLeast(
|
||||
UserRank.MEMBER if self.approved else UserRank.NEW_MEMBER))
|
||||
else:
|
||||
raise Exception("Permission {} is not related to releases".format(perm.name))
|
||||
|
||||
|
|
Loading…
Reference in New Issue