This commit is contained in:
Massimiliano Assante 2016-04-06 12:00:42 +00:00
parent e9fbcf32bd
commit f6aaadf3a3
3 changed files with 13 additions and 1 deletions

View File

@ -54,6 +54,7 @@
<artifactId>aslcore</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.dvos</groupId>
<artifactId>usermanagement-core</artifactId>
@ -68,6 +69,13 @@
<dependency>
<groupId>org.gcube.common.portal</groupId>
<artifactId>portal-manager</artifactId>
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>custom-portal-handler</artifactId>
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -1,9 +1,11 @@
package org.gcube.portlets.user.gcubewidgets.client;
import org.gcube.portlets.user.gcubewidgets.client.rpc.ScopeService;
import org.gcube.portlets.user.gcubewidgets.client.rpc.ScopeServiceAsync;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window.Location;
public class ClientScopeHelper {
public static ScopeServiceAsync getService() {
@ -25,4 +27,5 @@ public class ClientScopeHelper {
}
return null;
}
}

View File

@ -7,6 +7,7 @@ import javax.servlet.http.HttpSession;
import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.session.SessionManager;
import org.gcube.common.portal.PortalContext;
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
import org.gcube.portlets.user.gcubewidgets.client.rpc.ScopeService;
import org.gcube.vomanagement.usermanagement.GroupManager;
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
@ -81,7 +82,7 @@ public class ScopeServiceImpl extends RemoteServiceServlet implements ScopeServi
private ASLSession getASLSession() {
HttpSession httpSession = this.getThreadLocalRequest().getSession();
String sessionID = httpSession.getId();
String user = (String) httpSession.getAttribute("username");
String user = (String) httpSession.getAttribute(ScopeHelper.USERNAME_ATTRIBUTE);
if (user == null) {
_log.warn("NO USER FOUND, exiting");
return null;