From a5237b1c70f85913541a3abe9cdc5e1989ef7f57 Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Wed, 22 Jun 2016 15:31:47 +0000 Subject: [PATCH] Roles (into liferay) changed git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@129312 82a268e6-3cf1-43bd-a215-b396298e98cf --- .settings/org.eclipse.wst.common.component | 2 +- .../server/GcubeCkanDataCatalogServiceImpl.java | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 52c9d95..0df7cc0 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -4,7 +4,7 @@ - + uses 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 5d9b847..d19d84e 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 @@ -106,7 +106,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem ckanConnectorUri = ckanConnectorUri+fullPath; logger.info("returning ckanConnectorUri: "+ckanConnectorUri); return ckanConnectorUri; -// return "http://ckan-d-d4s.d4science.org"; + // return "http://ckan-d-d4s.d4science.org"; }catch(Exception e ){ String message = "Sorry an error occurred during contacting gCube Ckan Data Catalogue"; logger.error(message, e); @@ -270,9 +270,9 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem List roles = roleManager.listRolesByUserAndGroup(userManager.getUserId(username), groupManager.getGroupId(groupName)); logger.debug("The list of roles for " + username + " into " + groupName + " is " + roles); - + // the default one - CkanRolesIntoLiferay mainRole = CkanRolesIntoLiferay.CATALOG_MEMBER; + String mainRole = CkanRolesIntoLiferay.CATALOG_MEMBER; RolesIntoOrganization correspondentRoleToCheck = RolesIntoOrganization.MEMBER; // NOTE: it is supposed that there is just one role for this person correspondent to the one in the catalog @@ -312,11 +312,11 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem * @param mainRole the main role * @return the ckan role */ - private CkanRole reMapRole(CkanRolesIntoLiferay mainRole) { + private CkanRole reMapRole(String mainRole) { switch(mainRole){ - case CATALOG_ADMIN: return CkanRole.ADMIN; - case CATALOG_EDITOR: return CkanRole.EDITOR; - case CATALOG_MEMBER: ; + case CkanRolesIntoLiferay.CATALOG_ADMIN: return CkanRole.ADMIN; + case CkanRolesIntoLiferay.CATALOG_EDITOR: return CkanRole.EDITOR; + case CkanRolesIntoLiferay.CATALOG_MEMBER: ; default : return CkanRole.MEMBER; } }