mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 14:32:25 +01:00
Fix minor security vulnerability
This commit is contained in:
parent
ffb5b49521
commit
8484c0f0aa
@ -847,12 +847,11 @@ class PackageRelease(db.Model):
|
|||||||
name=self.package.name,
|
name=self.package.name,
|
||||||
id=self.id)
|
id=self.id)
|
||||||
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.releaseDate = datetime.datetime.now()
|
self.releaseDate = datetime.datetime.now()
|
||||||
|
|
||||||
def approve(self, user):
|
def approve(self, user):
|
||||||
if self.package.approved and \
|
if self.package.approved or \
|
||||||
not self.package.checkPerm(user, Permission.APPROVE_RELEASE):
|
not self.package.checkPerm(user, Permission.APPROVE_RELEASE):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user