From 3e00bc4a7a149963c58a7b3bd1a16fc58997a6e2 Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Thu, 16 Jun 2016 16:10:50 +0000 Subject: [PATCH] role check fixed git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@129149 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../server/GcubeCkanDataCatalogServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java index 76facaa..dececb6 100644 --- a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java +++ b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java @@ -10,7 +10,7 @@ import javax.servlet.http.HttpSession; import org.gcube.application.framework.core.session.ASLSession; import org.gcube.application.framework.core.session.SessionManager; import org.gcube.common.scope.api.ScopeProvider; -import org.gcube.datacatalogue.ckanutillibrary.CKanUtilsFactory; +import org.gcube.datacatalogue.ckanutillibrary.CKanUtilsImpl; import org.gcube.datacatalogue.ckanutillibrary.models.CkanRolesIntoLiferay; import org.gcube.datacatalogue.ckanutillibrary.models.RolesIntoOrganization; import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; @@ -196,8 +196,8 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem } } - // TODO with this invocation, we check if the role is present in ckan and if it is not it will be added - CKanUtilsFactory.getInstance().getCkanUtilsForScope(currentScope).checkRole(username, groupName, correspondentRoleToCheck); + // with this invocation, we check if the role is present in ckan and if it is not it will be added + new CKanUtilsImpl(currentScope).checkRole(username, groupName, correspondentRoleToCheck); return reMapRole(mainRole);