removed client context dpenendncy
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portal/portal-manager@133916 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
05383891ae
commit
306b1f8dcd
5
pom.xml
5
pom.xml
|
@ -41,11 +41,6 @@
|
|||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>client-context-library</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.dvos</groupId>
|
||||
<artifactId>usermanagement-core</artifactId>
|
||||
|
|
|
@ -18,4 +18,7 @@ public class GCubePortalConstants {
|
|||
public static final String SENDER_EMAIL = "notificationSenderEmail";
|
||||
public static final String GATEWAY_NAME = "portalinstancename";
|
||||
public static final String ADMIN_USERNAME = "administratorUsername";
|
||||
|
||||
public static final String VRE_ID_ATTR_NAME = "gcube-vreid";
|
||||
public static final String USER_ID_ATTR_NAME = "gcube-userId";
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import javax.servlet.http.HttpServletRequest;
|
|||
|
||||
import org.gcube.common.authorization.library.provider.UserInfo;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.portal.clientcontext.client.GCubeClientContext;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.CustomAttributeKeys;
|
||||
|
@ -42,7 +41,8 @@ import com.liferay.portal.util.PortalUtil;
|
|||
*/
|
||||
public class PortalContext {
|
||||
private static final Logger _log = LoggerFactory.getLogger(PortalContext.class);
|
||||
|
||||
public static final String VRE_ID_ATTR_NAME = "gcube-vreid";
|
||||
public static final String USER_ID_ATTR_NAME = "gcube-userId";
|
||||
/**
|
||||
* Scope separators used in linear syntax.
|
||||
*/
|
||||
|
@ -130,7 +130,7 @@ public class PortalContext {
|
|||
* @see GCubeUser
|
||||
*/
|
||||
public GCubeUser getCurrentUser(HttpServletRequest httpServletRequest) {
|
||||
String userIdNo = httpServletRequest.getHeader(GCubeClientContext.USER_ID_ATTR_NAME);
|
||||
String userIdNo = httpServletRequest.getHeader(USER_ID_ATTR_NAME);
|
||||
if (userIdNo != null) {
|
||||
long userId = -1;
|
||||
try {
|
||||
|
@ -161,7 +161,7 @@ public class PortalContext {
|
|||
* @see GCubeUser
|
||||
*/
|
||||
public String getCurrentScope(HttpServletRequest httpServletRequest) {
|
||||
String groupIdNo = httpServletRequest.getHeader(GCubeClientContext.VRE_ID_ATTR_NAME);
|
||||
String groupIdNo = httpServletRequest.getHeader(VRE_ID_ATTR_NAME);
|
||||
if (groupIdNo != null) {
|
||||
long groupId = -1;
|
||||
try {
|
||||
|
@ -197,7 +197,7 @@ public class PortalContext {
|
|||
* @see GCubeUser
|
||||
*/
|
||||
public String getCurrentUserToken(HttpServletRequest httpServletRequest) {
|
||||
String groupIdNo = httpServletRequest.getHeader(GCubeClientContext.VRE_ID_ATTR_NAME);
|
||||
String groupIdNo = httpServletRequest.getHeader(VRE_ID_ATTR_NAME);
|
||||
if (groupIdNo != null) {
|
||||
String scope = getCurrentScope(httpServletRequest);
|
||||
String username = getCurrentUser(httpServletRequest).getUsername();
|
||||
|
|
Loading…
Reference in New Issue