From 8c5b74c44468eb667af4f6b54269a9633f602d18 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Wed, 23 Oct 2019 16:47:40 +0200 Subject: [PATCH] fix method vosCreate: now the resource is filled with the input scopes before the checking on the vo scopes --- .../informationsystem/publisher/RegistryPublisherImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/informationsystem/publisher/RegistryPublisherImpl.java b/src/main/java/org/gcube/informationsystem/publisher/RegistryPublisherImpl.java index 2d0be4e..08f8aa7 100644 --- a/src/main/java/org/gcube/informationsystem/publisher/RegistryPublisherImpl.java +++ b/src/main/java/org/gcube/informationsystem/publisher/RegistryPublisherImpl.java @@ -88,7 +88,6 @@ public class RegistryPublisherImpl implements RegistryPublisher { log.debug("id generated: "+id); ResourceMediator.setId(resource, id); } - HashSet vosScopes = updateResourceScopes(resource); // add the new scopes for(String scope: scopes){ log.debug("[VOCREATE] new scope added {}",scope); @@ -101,6 +100,7 @@ public class RegistryPublisherImpl implements RegistryPublisher { log.error("the resource is not valid", e); throw new IllegalArgumentException("the resource is not valid ", e.getCause()); } + HashSet vosScopes = updateResourceScopes(resource); try{ if(currentScope != null){ // checking the current scope: if the operation fails in the current VO it will give an exception, if it fails in another VO no exception will be given