Added comment to debug First Name

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@131024 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2016-08-29 08:38:35 +00:00
parent fe7800faba
commit 1decd8c40e
3 changed files with 14 additions and 7 deletions

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>workspace-tree-widget</artifactId>
<version>6.13.0-SNAPSHOT</version>
<version>6.13.1-SNAPSHOT</version>
<name>gCube Workspace Tree Widget</name>
<description>
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace

View File

@ -42,7 +42,6 @@ import org.gcube.common.homelibrary.home.workspace.trash.WorkspaceTrashFolder;
import org.gcube.common.homelibrary.home.workspace.trash.WorkspaceTrashItem;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datacatalogue.ckanutillibrary.CKanUtils;
import org.gcube.datacatalogue.ckanutillibrary.CKanUtilsImpl;
import org.gcube.datacatalogue.ckanutillibrary.CkanUtilsFactory;
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
import org.gcube.portlets.user.workspace.client.interfaces.GXTCategoryItemInterface;
@ -109,7 +108,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
public static final String SELECTION_STATE_ATTRIBUTE = "WORKSPACE.SELECTION_STATE";
protected Logger workspaceLogger = Logger.getLogger(GWTWorkspaceServiceImpl.class);
// for the data catalogue
// for the data catalogue
private static final String CKAN_ROLE = "ckanRole"; // a true value means the user has admin role, false means member
private static final String CKAN_ORGANIZATIONS_PUBLISH_KEY = "ckanOrganizationsPublish"; // here he can publish
@ -2673,6 +2672,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
try {
LiferayUserManager l = new LiferayUserManager();
GCubeUser user = l.getUserByUsername(username);
workspaceLogger.info("My login first name is: "+user.getFirstName());
firstName = user.getFirstName();
lastName = user.getLastName();
email = user.getEmail();
@ -3400,7 +3400,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
throw new Exception(error);
}
}
/**
* Retrieve an instance of the library for the scope
* @param scope if it is null it is evaluated from the session
@ -3411,7 +3411,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
ASLSession asl = WsUtil.getAslSession(httpSession);
CKanUtils instance = null;
try{
String scopeInWhichDiscover = (scope != null && !scope.isEmpty()) ? scope : asl.getScope();
String scopeInWhichDiscover = scope != null && !scope.isEmpty() ? scope : asl.getScope();
workspaceLogger.debug("Discovering ckan instance into scope " + scopeInWhichDiscover);
instance = CkanUtilsFactory.getFactory().getUtilsPerScope(scopeInWhichDiscover);
}catch(Exception e){
@ -3468,10 +3468,10 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
role = false;
}
}
// set role in session
httpSession.setAttribute(CKAN_ROLE, role);
workspaceLogger.info("Do have the user the right to publish on the catalogue? " + role);
// return false

View File

@ -241,6 +241,11 @@ public class WsUtil {
}
return notifMng;
// SocialNetworkingSite site = new SocialNetworkingSite(request);
// SocialNetworkingUser curser = new SocialNetworkingUser(session.getUsername(), session.getUserEmailAddress(), session.getUserFullName(), session.getUserAvatarId());
// return new ApplicationNotificationsManager(site, session.getScope(), curser, NOTIFICATION_PORTLET_CLASS_ID);
}
/**
@ -262,6 +267,8 @@ public class WsUtil {
}
return notifProducer;
//return new NotificationsProducer(session, request);
}
/**