separator between my info and generic info is hidden when the portlet is deployed outside the portal. Minor fix for gcube-token recognized as product tag in some cases

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@142297 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-02-06 17:30:47 +00:00
parent a775694e67
commit 6c83e1953e
3 changed files with 12 additions and 6 deletions

View File

@ -213,6 +213,7 @@ public class CkanEventHandlerManager {
*/
private String getCkanRequest(String pathInfo, String query){
CkanConnectorAccessPoint ckan = new CkanConnectorAccessPoint(panel.getBaseURLCKANConnector(),"");
if(panel.getGcubeTokenValueToCKANConnector() != null)
ckan.addGubeToken(panel.getGcubeTokenValueToCKANConnector());
pathInfo = CkanConnectorAccessPoint.checkNullString(pathInfo);
query = CkanConnectorAccessPoint.checkNullString(query);

View File

@ -44,6 +44,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{
private Button products = new Button("Products");
// user's own
private InlineHTML separatorMyInfo = null;
private InlineHTML separatorAdminButtons = null;
private Button myDatasets = new Button("My Products");
private Button myOrganizations = new Button("My Organizations");
@ -109,7 +110,9 @@ public class CkanMetadataManagementPanel extends FlowPanel{
nav.add(groups);
nav.add(products);
nav.add(statistics);
nav.add(new InlineHTML("<span style=\"font-weight:bold;vertical-alignment:middle;\">|</span>"));
separatorMyInfo = new InlineHTML("<span style=\"font-weight:bold;vertical-alignment:middle;\">|</span>");
separatorMyInfo.setVisible(true);
nav.add(separatorMyInfo);
nav.add(myOrganizations);
nav.add(myGroups);
nav.add(myDatasets);
@ -284,6 +287,7 @@ public class CkanMetadataManagementPanel extends FlowPanel{
*/
public void doNotShowUserRelatedInfo(){
separatorMyInfo.setVisible(false);
insertMeta.setVisible(false);
editMeta.setVisible(false);
myDatasets.setVisible(false);

View File

@ -27,14 +27,13 @@ public class CkanConnectorAccessPoint implements Serializable{
public static final String URL_PATH_SEPARATOR = "/";
public static final String LIST_OF_VRES_PARAMETER = "listOfVres";
public static final String GCUBE_TOKEN_PARAMETER = "gcube-token";
private static final String GCUBE_TOKEN_PARAMETER = "gcube-token";
private String baseUrl;
private String pathInfoParameter;
private String queryStringParameters;
private String gcubeTokenValue;
private Map<String, String> mapVresRoles;
private String serverviceContext;
private boolean outsideFromPortal = false;
/**
@ -89,9 +88,11 @@ public class CkanConnectorAccessPoint implements Serializable{
* @param value the value
*/
public void addGubeToken(String value){
if(!outsideFromPortal){
this.gcubeTokenValue = value;
addGenericParameter(GCUBE_TOKEN_PARAMETER, value);
}
}
/**
* Adds the list of vr es.