Fixed import for liferay 6.2.5
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@129196 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
53d8d47dfd
commit
ad19179018
|
@ -4,6 +4,12 @@
|
|||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="ckan-metadata-publisher-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan-metadata-publisher-widget/ckan-metadata-publisher-widget">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="ckan-util-library-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan-util-library/ckan-util-library">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="context-root" value="gcube-ckan-datacatalog"/>
|
||||
<property name="java-output-path" value="/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<faceted-project>
|
||||
<fixed facet="wst.jsdt.web"/>
|
||||
<installed facet="java" version="1.7"/>
|
||||
<installed facet="jst.web" version="2.3"/>
|
||||
<installed facet="jst.web" version="3.0"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
<installed facet="liferay.portlet" version="6.0"/>
|
||||
</faceted-project>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -128,7 +128,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.dvos</groupId>
|
||||
<artifactId>usermanagement-core</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -20,14 +20,15 @@ import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanRole;
|
|||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.RoleManager;
|
||||
import org.gcube.vomanagement.usermanagement.UserManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayRoleManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.RoleModel;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayRoleManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeRole;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||
import com.liferay.portal.model.RoleModel;
|
||||
/**
|
||||
* The server side implementation of the RPC service.
|
||||
*
|
||||
|
@ -248,14 +249,14 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
|
|||
UserManager userManager = new LiferayUserManager();
|
||||
RoleManager roleManager = new LiferayRoleManager();
|
||||
GroupManager groupManager = new LiferayGroupManager();
|
||||
List<RoleModel> roles = roleManager.listRolesByUserAndGroup(groupManager.getGroupId(groupName), userManager.getUserId(username));
|
||||
List<GCubeRole> roles = roleManager.listRolesByUserAndGroup(groupManager.getGroupId(groupName), userManager.getUserId(username));
|
||||
|
||||
// the default one
|
||||
CkanRolesIntoLiferay mainRole = CkanRolesIntoLiferay.CATALOG_MEMBER;
|
||||
RolesIntoOrganization correspondentRoleToCheck = RolesIntoOrganization.MEMBER;
|
||||
|
||||
// NOTE: it is supposed that there is just one role for this person correspondent to the one in the catalog
|
||||
for (RoleModel role : roles) {
|
||||
for (GCubeRole role : roles) {
|
||||
|
||||
logger.debug("User " + username + " has role " + role.getRoleName() + " in " + currentScope);
|
||||
if(role.getRoleName().contains(CkanRolesIntoLiferay.CATALOG_ADMIN.toString())){
|
||||
|
|
Loading…
Reference in New Issue