From e82dac44031a40e8b1224a4863c813d7df18e388 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 30 Mar 2024 17:41:47 +0000 Subject: [PATCH] Fix collections showing unapproved packages Fixes #504 --- app/blueprints/collections/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/blueprints/collections/__init__.py b/app/blueprints/collections/__init__.py index 6b6eca04..7a0c56ff 100644 --- a/app/blueprints/collections/__init__.py +++ b/app/blueprints/collections/__init__.py @@ -67,7 +67,7 @@ def view(author, name): abort(404) items = collection.items - if collection.check_perm(current_user, Permission.EDIT_COLLECTION): + if not collection.check_perm(current_user, Permission.EDIT_COLLECTION): items = [x for x in items if x.package.check_perm(current_user, Permission.VIEW_PACKAGE)] return render_template("collections/view.html", collection=collection, items=items)