aboutsummaryrefslogtreecommitdiff
path: root/app/models.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-04-21 17:06:27 +0100
committerrubenwardy <rw@rubenwardy.com>2020-04-21 17:07:04 +0100
commita8374ec779aec7e3c5f87a6eb35522d85654d69d (patch)
tree48e8f1caa9a4ce0b0635049d48e74286d1802625 /app/models.py
parent24090235d1a07c5a5fd719d1b67eb2458aba4f59 (diff)
downloadcheatdb-a8374ec779aec7e3c5f87a6eb35522d85654d69d.tar.xz
Allow all members to approve own releases
Diffstat (limited to 'app/models.py')
-rw-r--r--app/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models.py b/app/models.py
index 7a24afb..4eed0c2 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