Fix 404 on packages when not logged in

This commit is contained in:
rubenwardy 2022-01-22 00:04:09 +00:00
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]