mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +01:00
Fix 404 on packages when not logged in
This commit is contained in:
parent
a48c0fb2b4
commit
85a178d90e
@ -596,7 +596,7 @@ class Package(db.Model):
|
|||||||
|
|
||||||
def checkPerm(self, user, perm):
|
def checkPerm(self, user, perm):
|
||||||
if not user.is_authenticated:
|
if not user.is_authenticated:
|
||||||
return False
|
return perm == Permission.SEE_PACKAGE and self.state == PackageState.APPROVED
|
||||||
|
|
||||||
if type(perm) == str:
|
if type(perm) == str:
|
||||||
perm = Permission[perm]
|
perm = Permission[perm]
|
||||||
|
Loading…
Reference in New Issue
Block a user