From a8374ec779aec7e3c5f87a6eb35522d85654d69d Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 21 Apr 2020 17:06:27 +0100 Subject: [PATCH] Allow all members to approve own releases --- app/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models.py b/app/models.py index 7a24afb7..4eed0c22 100644 --- a/app/models.py +++ b/app/models.py @@ -659,7 +659,7 @@ class Package(db.Model): if perm == Permission.MAKE_RELEASE or perm == Permission.ADD_SCREENSHOTS: return isOwner or user.rank.atLeast(UserRank.EDITOR) - if perm == Permission.EDIT_PACKAGE or perm == Permission.APPROVE_CHANGES: + if perm == Permission.EDIT_PACKAGE or perm == Permission.APPROVE_CHANGES or perm == Permission.APPROVE_RELEASE: if isOwner: return user.rank.atLeast(UserRank.MEMBER if self.approved else UserRank.NEW_MEMBER) else: @@ -673,7 +673,7 @@ class Package(db.Model): elif perm == Permission.APPROVE_NEW or perm == Permission.CHANGE_AUTHOR: return user.rank.atLeast(UserRank.EDITOR) - elif perm == Permission.APPROVE_RELEASE or perm == Permission.APPROVE_SCREENSHOT: + elif perm == Permission.APPROVE_SCREENSHOT: return user.rank.atLeast(UserRank.TRUSTED_MEMBER if isOwner else UserRank.EDITOR) # Moderators can delete packages