diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java index 4d1674c..df034cc 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/CKANPublisherServicesImpl.java @@ -553,7 +553,8 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C // get the scope in which we should discover the ckan instance given the organization name in which the dataset was created String scope = getScopeFromOrgName(resource.getOrganizationNameDatasetParent()); DataCatalogue catalogue = getCatalogue(scope); - deleted = catalogue.deleteResourceFromDataset(resource.getOriginalIdInWorkspace()); + String username = GenericUtils.getCurrentUser(getThreadLocalRequest()).getUsername(); + deleted = catalogue.deleteResourceFromDataset(resource.getOriginalIdInWorkspace(),username); if(deleted){ logger.info("Resource described by " + resource + " deleted"); }else @@ -619,7 +620,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C */ private String getScopeFromOrgName(String orgName){ - logger.debug("Request for scope related to orgName " + orgName + "[ map that will be used is " + mapOrganizationScope.toString() + " ]"); + logger.info("Request for scope related to orgName " + orgName + " [map that will be used is " + mapOrganizationScope.toString() + "]"); if(orgName == null || orgName.isEmpty()) throw new IllegalArgumentException("orgName cannot be empty or null!"); @@ -647,7 +648,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C toReturn = GenericUtils.getCurrentContext(this.getThreadLocalRequest(), false); mapOrganizationScope.put(orgName, toReturn); } - logger.debug("Returning scope " + toReturn); + logger.info("Returning scope " + toReturn); return toReturn; }