From 2a8974b1b8a51a3405cda1cdd864f45ea77d06b6 Mon Sep 17 00:00:00 2001 From: Tim Lorsbach Date: Wed, 11 Nov 2026 20:07:07 +0100 Subject: [PATCH] App Integration Secret Packages --- epdb/logic.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/epdb/logic.py b/epdb/logic.py index bd90b044..f4eba92a 100644 --- a/epdb/logic.py +++ b/epdb/logic.py @@ -376,13 +376,12 @@ class PackageManager(object): groups = GroupManager.get_groups(user) # EDIT START - if package.classification_level == Package.Classification.SECRET: if user.principal_type == user.PrincipalType.APP: if not user.app_details.secret_allowed or package.data_pool != user.app_details.data_pool: return False - if package.data_pool not in groups: + elif package.data_pool not in groups: return False # EDIT END @@ -444,6 +443,10 @@ class PackageManager(object): @staticmethod def check_package_classification(user, pack: Package): if pack.classification_level == Package.Classification.SECRET: + if user.principal_type == user.PrincipalType.APP: + if pack.data_pool == user.app_details.data_pool: + return pack + if pack.data_pool.user_member.filter(id=user.id).exists(): return pack