From 85a178d90e7ea654f456716a203388a1035048a4 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 22 Jan 2022 00:04:09 +0000 Subject: [PATCH] Fix 404 on packages when not logged in --- app/models/packages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/packages.py b/app/models/packages.py index 790f3eb..9cdf417 100644 --- a/app/models/packages.py +++ b/app/models/packages.py @@ -596,7 +596,7 @@ class Package(db.Model): def checkPerm(self, user, perm): if not user.is_authenticated: - return False + return perm == Permission.SEE_PACKAGE and self.state == PackageState.APPROVED if type(perm) == str: perm = Permission[perm]