diff --git a/ramls/acq-models b/ramls/acq-models index c0c72775d..308fa7ac5 160000 --- a/ramls/acq-models +++ b/ramls/acq-models @@ -1 +1 @@ -Subproject commit c0c72775d08c28a77d1475df435497e8b0020667 +Subproject commit 308fa7ac549d4ffe2bbf187c4401027507cf342b diff --git a/src/main/java/org/folio/helper/PurchaseOrderLineHelper.java b/src/main/java/org/folio/helper/PurchaseOrderLineHelper.java index 5ea8e94f5..4dcdda703 100644 --- a/src/main/java/org/folio/helper/PurchaseOrderLineHelper.java +++ b/src/main/java/org/folio/helper/PurchaseOrderLineHelper.java @@ -736,13 +736,16 @@ private Future validateUserUnaffiliatedLocationUpdates(CompositePoLine upd return getUserTenantsIfNeeded(requestContext) .compose(userTenants -> { if (CollectionUtils.isEmpty(userTenants)) { + logger.info("validateUserUnaffiliatedLocationUpdates:: User tenants is empty"); return Future.succeededFuture(); } var storageUnaffiliatedLocations = extractUnaffiliatedLocations(storedPoLine.getLocations(), userTenants); var updatedUnaffiliatedLocations = extractUnaffiliatedLocations(updatedPoLine.getLocations(), userTenants); if (!SetUtils.isEqualSet(storageUnaffiliatedLocations, updatedUnaffiliatedLocations)) { + logger.info("validateUserUnaffiliatedLocationUpdates:: User is not affiliated with all locations on the POL"); return Future.failedFuture(new HttpException(422, ErrorCodes.LOCATION_UPDATE_WITHOUT_AFFILIATION)); } + logger.info("validateUserUnaffiliatedLocationUpdates:: User is affiliated with all locations on the POL"); return Future.succeededFuture(); }); } @@ -829,6 +832,7 @@ private Future verifyDeleteAllowed(PoLine line, RequestContext requestCont } private Future createShadowInstanceIfNeeded(CompositePoLine compositePoLine, RequestContext requestContext) { + logger.info("createShadowInstanceIfNeeded:: Creating shadow instance if needed"); String instanceId = compositePoLine.getInstanceId(); if (Boolean.TRUE.equals(compositePoLine.getIsPackage()) || Objects.isNull(instanceId)) { return Future.succeededFuture(); diff --git a/src/main/java/org/folio/service/ProtectionService.java b/src/main/java/org/folio/service/ProtectionService.java index 2984f531b..78a9c4af3 100644 --- a/src/main/java/org/folio/service/ProtectionService.java +++ b/src/main/java/org/folio/service/ProtectionService.java @@ -69,6 +69,7 @@ public Future isOperationRestricted(List unitIds, ProtectedOperati */ public Future isOperationRestricted(List unitIds, Set operations, RequestContext requestContext) { if (userHasDesiredPermission(BYPASS_ACQ_UNITS, requestContext)) { + log.info("isOperationRestricted:: No desired permissions found"); return Future.succeededFuture(); } if (CollectionUtils.isNotEmpty(unitIds)) { @@ -81,6 +82,7 @@ public Future isOperationRestricted(List unitIds, Set isOperationRestricted(List unitIds, Set> getConsortiumConfig .map(jsonObject -> jsonObject.getJsonArray(USER_TENANTS_ARRAY_IDENTIFIER)) .map(userTenants -> { if (userTenants.isEmpty()) { - logger.debug("Central tenant and consortium id not found"); + logger.info("getConsortiumConfigurationFromRemote:: Central tenant and consortium id not found"); return Optional.empty(); } String consortiumId = userTenants.getJsonObject(0).getString(CONSORTIUM_ID_FIELD); String centralTenantId = userTenants.getJsonObject(0).getString(CENTRAL_TENANT_ID_FIELD); - logger.debug("Found centralTenantId: {} and consortiumId: {}", centralTenantId, consortiumId); + logger.info("getConsortiumConfigurationFromRemote:: Found centralTenantId: {} and consortiumId: {}", centralTenantId, consortiumId); return Optional.of(new ConsortiumConfiguration(centralTenantId, consortiumId)); }).toCompletionStage().toCompletableFuture(); }