From 4ece437d1bf231d8292922cbf03aa997865ca725 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Thu, 9 Jun 2022 11:22:30 +0200 Subject: [PATCH] Fixing code --- .../resourceregistry/rest/SharingManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/rest/SharingManager.java b/src/main/java/org/gcube/informationsystem/resourceregistry/rest/SharingManager.java index 5e71753..3b5b433 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/rest/SharingManager.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/rest/SharingManager.java @@ -92,6 +92,7 @@ public class SharingManager { @PathParam(AccessPath.CONTEXT_UUID_PATH_PARAM) String contextId, @QueryParam(SharingPath.OPERATION_QUERY_PARAMETER) SharingOperation operation, @QueryParam(SharingPath.DRY_RUN_QUERY_PARAMETER) @DefaultValue("false") Boolean dryRun, + @QueryParam(SharingPath.FORCE_ADD_TO_CONTEXT_QUERY_PARAMETER) @DefaultValue("false") Boolean forceAddToContext, String body) throws SchemaViolationException, ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException { @@ -201,8 +202,8 @@ public class SharingManager { if(operation == SharingOperation.ADD) { - ((ERManagement) elementManagement).addToContext(contextUUID); ((ERManagement) elementManagement).setForceAddToContext(forceAddToContext); + ((ERManagement) elementManagement).addToContext(contextUUID); }else { ((ERManagement) elementManagement).removeFromContext(contextUUID); }