updated pom to maven portal bom 3.0
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/custom-portal-handler@128428 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
310fb934bf
commit
5e06e0a13e
18
pom.xml
18
pom.xml
|
@ -45,17 +45,14 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>authorization-client</artifactId>
|
<artifactId>authorization-client</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>common-authorization</artifactId>
|
<artifactId>common-authorization</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common.portal</groupId>
|
<groupId>org.gcube.common.portal</groupId>
|
||||||
<artifactId>portal-manager</artifactId>
|
<artifactId>portal-manager</artifactId>
|
||||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -66,30 +63,15 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.dvos</groupId>
|
<groupId>org.gcube.dvos</groupId>
|
||||||
<artifactId>usermanagement-core</artifactId>
|
<artifactId>usermanagement-core</artifactId>
|
||||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.liferay.portal</groupId>
|
<groupId>com.liferay.portal</groupId>
|
||||||
<artifactId>portal-service</artifactId>
|
<artifactId>portal-service</artifactId>
|
||||||
<version>${liferay.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.liferay.portal</groupId>
|
|
||||||
<artifactId>util-bridges</artifactId>
|
|
||||||
<version>${liferay.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.liferay.portal</groupId>
|
|
||||||
<artifactId>util-taglib</artifactId>
|
|
||||||
<version>${liferay.version}</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.liferay.portal</groupId>
|
<groupId>com.liferay.portal</groupId>
|
||||||
<artifactId>util-java</artifactId>
|
<artifactId>util-java</artifactId>
|
||||||
<version>${liferay.version}</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.gcube.portal.custom.scopemanager.scopehelper;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
@ -13,6 +14,7 @@ import org.gcube.application.framework.core.session.ASLSession;
|
||||||
import org.gcube.application.framework.core.session.SessionManager;
|
import org.gcube.application.framework.core.session.SessionManager;
|
||||||
import org.gcube.application.framework.core.util.GenderType;
|
import org.gcube.application.framework.core.util.GenderType;
|
||||||
import org.gcube.common.portal.PortalContext;
|
import org.gcube.common.portal.PortalContext;
|
||||||
|
import org.gcube.common.scope.api.ScopeProvider;
|
||||||
import org.gcube.portal.custom.communitymanager.SiteManagerUtil;
|
import org.gcube.portal.custom.communitymanager.SiteManagerUtil;
|
||||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||||
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
||||||
|
@ -30,7 +32,8 @@ import com.liferay.portal.model.User;
|
||||||
import com.liferay.portal.service.RoleLocalServiceUtil;
|
import com.liferay.portal.service.RoleLocalServiceUtil;
|
||||||
import com.liferay.portal.service.UserLocalServiceUtil;
|
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||||
import com.liferay.portal.theme.ThemeDisplay;
|
import com.liferay.portal.theme.ThemeDisplay;
|
||||||
|
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||||
|
import static org.gcube.common.authorization.client.Constants.authorizationService;
|
||||||
|
|
||||||
public class ScopeHelper {
|
public class ScopeHelper {
|
||||||
|
|
||||||
|
@ -135,27 +138,19 @@ public class ScopeHelper {
|
||||||
|
|
||||||
}
|
}
|
||||||
private final static String DEFAULT_ROLE = "OrganizationMember";
|
private final static String DEFAULT_ROLE = "OrganizationMember";
|
||||||
private final static String TEST_USER = "test.user";
|
|
||||||
|
|
||||||
private static void setAuthorizationToken(ASLSession session) {
|
private static void setAuthorizationToken(ASLSession session) {
|
||||||
//TODO:
|
String username = session.getUsername();
|
||||||
// String username = session.getUsername();
|
String scope = session.getScope();
|
||||||
// _log.debug("Generating token");
|
ScopeProvider.instance.set(scope);
|
||||||
// String managerName = "lucio.lelii";
|
_log.debug("calling service token on scope " + scope);
|
||||||
// if (username.compareTo(TEST_USER) == 0)
|
List<String> userRoles = new ArrayList<>();
|
||||||
// return;
|
userRoles.add(DEFAULT_ROLE);
|
||||||
// String scope = session.getScope();
|
session.setSecurityToken(null);
|
||||||
// ScopeProvider.instance.set(scope);
|
String token = authorizationService().build().generate(session.getUsername(), userRoles);
|
||||||
// _log.debug("calling service token on scope " + scope);
|
_log.debug("received token: "+token);
|
||||||
// List<String> userRoles = new ArrayList<>();
|
session.setSecurityToken(token);
|
||||||
// userRoles.add(DEFAULT_ROLE);
|
_log.info("Security token set in session for: "+username + " on " + scope);
|
||||||
// if (username.compareTo("lucio.lelii")==0)
|
|
||||||
// userRoles.add("VRE-Manager");
|
|
||||||
// session.setSecurityToken(null);
|
|
||||||
// String token = authorizationService().build().generate(session.getUsername(), userRoles);
|
|
||||||
// _log.debug("received token: "+token);
|
|
||||||
// session.setSecurityToken(token);
|
|
||||||
// _log.info("Security token set in session for: "+username + " on " + scope);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* read the root VO name from a property file and retuns it
|
* read the root VO name from a property file and retuns it
|
||||||
|
|
Loading…
Reference in New Issue