diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index e448544..5fe3680 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -4,12 +4,6 @@
-
- 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 79d282d..4b8cea4 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
@@ -43,6 +43,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
private static final String HTTPS = "https";
private static final String HTTP = "http";
public static String CKANCONNECTORCONTEXT = "CkanConnectorContext";
+ public static String CKANHIDEHEADER = "CkanHideHeader";
public static final String USERNAME_ATTRIBUTE = ScopeHelper.USERNAME_ATTRIBUTE;
private static Logger logger = LoggerFactory.getLogger(GcubeCkanDataCatalogServiceImpl.class);
private final static String DEFAULT_ROLE = "OrganizationMember";
@@ -105,6 +106,9 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
try{
String ckanContext = getServletContext().getInitParameter(CKANCONNECTORCONTEXT);
logger.debug(CKANCONNECTORCONTEXT + " is: "+ckanContext);
+ String ckanHideHeader = getServletContext().getInitParameter(CKANHIDEHEADER);
+ logger.debug(CKANHIDEHEADER + " is: "+ckanHideHeader);
+
ASLSession session = getASLSession(this.getThreadLocalRequest().getSession());
GcoreEndpointReader ckanEndPoint = SessionUtil.getCkanEndPoint(session);
String ckanConnectorUri = ckanEndPoint.getCkanResourceEntyName();
@@ -118,8 +122,9 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
ckanConnectorUri+="?"+GCUBE_TOKEN+"="+getGcubeSecurityToken();
}else{
logger.warn("******** Using TEST_USER security token!!!");
- ckanConnectorUri+="?"+GCUBE_TOKEN+"="+TEST_SEC_TOKEN;
+ ckanConnectorUri+="?"+GCUBE_TOKEN+"="+TEST_SEC_TOKEN +"&" +ckanHideHeader;
}
+ ckanConnectorUri+="&" +ckanHideHeader; //added query string to hide header from portal
logger.info("returning ckanConnectorUri: "+ckanConnectorUri);
return ckanConnectorUri;
// return "http://ckan-d-d4s.d4science.org";
@@ -232,7 +237,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
// NOTE: it is supposed that there is just one role for this person correspondent to the one in the catalog
for (RoleModel role : roles) {
- logger.debug("User " + username + " has role " + role.getRoleName() + " in " + currentScope);
+ logger.debug("User " + username + " has role " + role.getRoleName() + " in " + currentScope);
if(role.getRoleName().contains(CkanRolesIntoLiferay.CATALOG_ADMIN.toString())){
mainRole = CkanRolesIntoLiferay.CATALOG_ADMIN;
correspondentRoleToCheck = RolesIntoOrganization.ADMIN;
@@ -241,7 +246,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
mainRole = CkanRolesIntoLiferay.CATALOG_EDITOR;
correspondentRoleToCheck = RolesIntoOrganization.EDITOR;
break;
- }
+ }
}
// with this invocation, we check if the role is present in ckan and if it is not it will be added
@@ -257,7 +262,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
logger.debug("Unable to check the role into ckan organization, returning MEMBER as role");
// return the base role
- return CkanRole.MEMBER;
+ return CkanRole.MEMBER;
}
/**
@@ -270,7 +275,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
case CATALOG_ADMIN: return CkanRole.ADMIN;
case CATALOG_EDITOR: return CkanRole.EDITOR;
case CATALOG_MEMBER: ;
- default : return CkanRole.MEMBER;
+ default : return CkanRole.MEMBER;
}
}
diff --git a/src/main/resources/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/Messages_fr.properties b/src/main/resources/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/Messages_fr.properties
deleted file mode 100644
index b4a7627..0000000
--- a/src/main/resources/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/client/Messages_fr.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-sendButton = Envoyer
-nameField = Entrez votre nom
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 519e508..d78b803 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -11,6 +11,12 @@
/gcube/service/connect
+
+ CkanHideHeader
+
+ /hh=true
+
+
gcubeckandatacatalogservice