diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index d96692a..e448544 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -7,6 +7,9 @@
uses
+
+ 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 047d574..80e8c0e 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
@@ -20,7 +20,6 @@ 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.CKanUtilsImpl;
-import org.gcube.datacatalogue.ckanutillibrary.models.CkanRolesIntoLiferay;
import org.gcube.datacatalogue.ckanutillibrary.models.RolesIntoOrganization;
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GcubeCkanDataCatalogService;
@@ -33,6 +32,7 @@ import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
import org.gcube.vomanagement.usermanagement.impl.LiferayRoleManager;
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
import org.gcube.vomanagement.usermanagement.model.GCubeRole;
+import org.gcube.vomanagement.usermanagement.model.GatewayRolesNames;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -284,19 +284,19 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
logger.debug("The list of roles for " + username + " into " + groupName + " is " + roles);
// the default one
- String mainRole = CkanRolesIntoLiferay.CATALOG_MEMBER;
+ String mainRole = "Catalogue-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
for (GCubeRole role : roles) {
logger.debug("User " + username + " has role " + role.getRoleName() + " in " + currentScope);
- if(role.getRoleName().equalsIgnoreCase(CkanRolesIntoLiferay.CATALOG_ADMIN.toString())){
- mainRole = CkanRolesIntoLiferay.CATALOG_ADMIN;
+ if(role.getRoleName().equalsIgnoreCase(GatewayRolesNames.CATALOGUE_ADMIN.getRoleName())){
+ mainRole = GatewayRolesNames.CATALOGUE_ADMIN.getRoleName();
correspondentRoleToCheck = RolesIntoOrganization.ADMIN;
break;
- }else if(role.getRoleName().equalsIgnoreCase(CkanRolesIntoLiferay.CATALOG_EDITOR.toString())){
- mainRole = CkanRolesIntoLiferay.CATALOG_EDITOR;
+ }else if(role.getRoleName().equalsIgnoreCase(GatewayRolesNames.CATALOGUE_EDITOR.getRoleName())){
+ mainRole = GatewayRolesNames.CATALOGUE_EDITOR.getRoleName();
correspondentRoleToCheck = RolesIntoOrganization.EDITOR;
break;
}
@@ -326,9 +326,9 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
*/
private CkanRole reMapRole(String mainRole) {
switch(mainRole){
- case CkanRolesIntoLiferay.CATALOG_ADMIN: return CkanRole.ADMIN;
- case CkanRolesIntoLiferay.CATALOG_EDITOR: return CkanRole.EDITOR;
- case CkanRolesIntoLiferay.CATALOG_MEMBER: return CkanRole.MEMBER;
+ case "Catalogue-Admin": return CkanRole.ADMIN;
+ case "Catalogue-Editor": return CkanRole.EDITOR;
+ case "Catalogue-Member": return CkanRole.MEMBER;
default : return CkanRole.MEMBER;
}
}