mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Allow new members to edit their packages if it hasn't been approved yet
This commit is contained in:
parent
65fdba5882
commit
e85298d890
@ -401,7 +401,10 @@ class Package(db.Model):
|
||||
return isOwner or user.rank.atLeast(UserRank.EDITOR)
|
||||
|
||||
if perm == Permission.EDIT_PACKAGE or perm == Permission.APPROVE_CHANGES:
|
||||
return user.rank.atLeast(UserRank.MEMBER if isOwner else UserRank.EDITOR)
|
||||
if isOwner:
|
||||
return user.rank.atLeast(UserRank.MEMBER if self.approved else UserRank.NEW_MEMBER)
|
||||
else:
|
||||
return user.rank.atLeast(UserRank.EDITOR)
|
||||
|
||||
# Editors can change authors, approve new packages, and approve releases
|
||||
elif perm == Permission.CHANGE_AUTHOR or perm == Permission.APPROVE_NEW \
|
||||
|
Loading…
Reference in New Issue
Block a user