From b5c75da1b233dae5abe0ba9519a2369acf114c71 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 23 Jul 2024 15:09:23 +0200 Subject: [PATCH] feat(impl): [#734] Handling for modification attempts on read-only default policies: add handleTrialToModifyFallbackPolicy to registerPolicy method --- .../tractusx/irs/policystore/services/PolicyStoreService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java index 706e23a9b..a5dfed231 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java @@ -109,6 +109,8 @@ public Policy registerPolicy(final CreatePolicyRequest request) { final Policy policy = edcTransformer.transformToIrsPolicy(policyJson); policy.setValidUntil(request.validUntil()); + handleTrialToModifyFallbackPolicy(policy.getPolicyId()); + registeredPolicy = doRegisterPolicy(policy, request.businessPartnerNumber() == null ? BPN_DEFAULT : request.businessPartnerNumber());