UPDATED distro folder
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/register-vre-users@125133 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5f0634e2da
commit
b9c338756e
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/register-vre-users-1.4.2-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/register-vre-users-2.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
@ -31,5 +31,5 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/register-vre-users-1.4.2-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/register-vre-users-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="invites-common-library-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/invites-common-library/invites-common-library">
|
||||
<dependent-module archiveName="invites-common-library-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/invites-common-library/invites-common-library">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<fixed facet="wst.jsdt.web"/>
|
||||
<installed facet="jst.web" version="2.3"/>
|
||||
<installed facet="jst.web" version="3.0"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
<installed facet="java" version="1.7"/>
|
||||
<installed facet="liferay.portlet" version="6.0"/>
|
||||
<installed facet="liferay.portlet" version="6.2"/>
|
||||
</faceted-project>
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
|
|
@ -1,7 +1 @@
|
|||
gCube System - License
|
||||
------------------------------------------------------------
|
||||
|
||||
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||
The software and documentation is provided by its authors/distributors "as is" and no expressed or
|
||||
implied warranty is given for its use, quality or fitness for a particular case.
|
||||
|
||||
${gcube.license}
|
|
@ -1,6 +0,0 @@
|
|||
Mantainers
|
||||
-------
|
||||
|
||||
* Massimiliano Assante (massimiliano.assante@isti.cnr.it), CNR Pisa,
|
||||
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".
|
||||
|
|
@ -1,35 +1,45 @@
|
|||
The gCube System - Social Library
|
||||
The gCube System
|
||||
------------------------------------------------------------
|
||||
|
||||
This work is partially funded by the European Commission in the
|
||||
context of the iMarine project (www.i-marine.eu), under the 1st call of FP7 IST priority.
|
||||
${gcube.description}
|
||||
|
||||
${gcube.funding}
|
||||
|
||||
|
||||
Version
|
||||
--------------------------------------------------
|
||||
${version} (${buildDate})
|
||||
|
||||
Please see the file named "changelog.xml" in this directory for the release notes.
|
||||
|
||||
|
||||
Authors
|
||||
-------
|
||||
Massimiliano Assante
|
||||
*
|
||||
Version and Release Date
|
||||
------------------------
|
||||
Jan 2013
|
||||
|
||||
|
||||
Massimiliano Assante (massimiliano.assante-AT-isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
|
||||
|
||||
|
||||
Description
|
||||
Maintainers
|
||||
-----------
|
||||
Social networking Library
|
||||
|
||||
Download information
|
||||
--------------------
|
||||
Source code is available from SVN:
|
||||
https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/notifications
|
||||
|
||||
Binaries can be downloaded from:
|
||||
http://software.d4science.research-infrastructures.eu/
|
||||
|
||||
Documentation
|
||||
|
||||
Massimiliano Assante (massimiliano.assante-AT-isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
Documentation is available on-line from the Projects Documentation Wiki:
|
||||
|
||||
Documentation is available on - line from the Projects Documentation wiki:
|
||||
|
||||
{gcube.wikiRoot}/gcube/index.php/UserManagement_Core
|
||||
|
||||
|
||||
Support
|
||||
--------------------------------------------------
|
||||
Bugs and support requests can be reported in the gCube issue tracking tool:
|
||||
${gcube.issueTracking}
|
||||
|
||||
|
||||
Licensing
|
||||
---------
|
||||
|
||||
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
|
||||
--------------------------------------------------
|
||||
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
${scm.url}
|
33
pom.xml
33
pom.xml
|
@ -12,7 +12,7 @@
|
|||
<groupId>org.gcube.portlets.admin</groupId>
|
||||
<artifactId>register-vre-users</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.4.2-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<name>Register VRE Users</name>
|
||||
<description>
|
||||
Rigister VRE Users Portlet allow to select a user from the portal and add her to the VRE.
|
||||
|
@ -29,7 +29,7 @@
|
|||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
||||
|
||||
<liferay.version>6.2.5</liferay.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
@ -57,6 +57,12 @@
|
|||
<version>${gwtVersion}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-dev</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>${gwtVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslcore</artifactId>
|
||||
|
@ -70,6 +76,7 @@
|
|||
<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>
|
||||
|
@ -132,10 +139,30 @@
|
|||
<groupId>org.gcube.dvos</groupId>
|
||||
<artifactId>usermanagement-core</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.liferay.portal</groupId>
|
||||
<artifactId>portal-service</artifactId>
|
||||
<version>${liferay.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.liferay.portal</groupId>
|
||||
<artifactId>portal-service</artifactId>
|
||||
<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>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.liferay.portal</groupId>
|
||||
<artifactId>util-java</artifactId>
|
||||
<version>${liferay.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -11,7 +11,7 @@ import org.gcube.common.homelibrary.home.HomeLibrary;
|
|||
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
||||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
import org.gcube.common.scope.impl.ScopeBean.Type;
|
||||
import org.gcube.portal.custom.communitymanager.OrganizationsUtil;
|
||||
import org.gcube.portal.custom.communitymanager.SiteManagerUtil;
|
||||
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||
import org.gcube.portal.notifications.bean.GenericItemBean;
|
||||
import org.gcube.portal.notifications.thread.MessageNotificationsThread;
|
||||
|
@ -21,9 +21,9 @@ import org.gcube.vomanagement.usermanagement.GroupManager;
|
|||
import org.gcube.vomanagement.usermanagement.UserManager;
|
||||
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.UserModel;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -103,23 +103,23 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Man
|
|||
public ArrayList<PortalUserDTO> getNonBelongingUsersForVRE() {
|
||||
|
||||
try {
|
||||
long companyId = OrganizationsUtil.getCompany().getCompanyId();
|
||||
long companyId = SiteManagerUtil.getCompany().getCompanyId();
|
||||
_log.trace("Setting Thread Permission");
|
||||
User user = UserLocalServiceUtil.getUserByScreenName(companyId, ScopeHelper.getAdministratorUsername());
|
||||
PermissionChecker permissionChecker = PermissionCheckerFactoryUtil.create(user, false);
|
||||
PermissionChecker permissionChecker = PermissionCheckerFactoryUtil.create(user);
|
||||
PermissionThreadLocal.setPermissionChecker(permissionChecker);
|
||||
_log.trace("Setting Permission ok!");
|
||||
|
||||
ArrayList<PortalUserDTO> unregisteredUsers = new ArrayList<PortalUserDTO>();
|
||||
List<UserModel> notBelongingUsers = userM.listUnregisteredUsersByGroup(getCurrentGroupID());
|
||||
for (UserModel u : notBelongingUsers) {
|
||||
List<GCubeUser> notBelongingUsers = userM.listUnregisteredUsersByGroup(getCurrentGroupID());
|
||||
for (GCubeUser u : notBelongingUsers) {
|
||||
String id = u.getScreenName();
|
||||
user = UserLocalServiceUtil.getUserByScreenName(companyId, id);
|
||||
|
||||
String position = (user.getExpandoBridge().getAttribute(POSITION) != null) ? user.getExpandoBridge().getAttribute(POSITION).toString() : "";
|
||||
String labs = (user.getExpandoBridge().getAttribute(LABS) != null) ? user.getExpandoBridge().getAttribute(LABS).toString() : "";
|
||||
if ((u.getLastname() != null && u.getLastname().compareTo("") != 0)) {
|
||||
String firstLetter = u.getLastname().substring(0,1);
|
||||
if ((u.getLastName() != null && u.getLastName().compareTo("") != 0)) {
|
||||
String firstLetter = u.getLastName().substring(0,1);
|
||||
String scope = getASLSession().getScope();
|
||||
ScopeBean validator = new ScopeBean(scope);
|
||||
String email = u.getEmail();
|
||||
|
@ -127,7 +127,7 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Man
|
|||
if (validator.is(Type.VRE)) {
|
||||
email = "********@"+ email.split("@")[1];
|
||||
}
|
||||
PortalUserDTO myUser = new PortalUserDTO(username, firstLetter, u.getFirstname(), u.getLastname(), email, position, labs);
|
||||
PortalUserDTO myUser = new PortalUserDTO(username, firstLetter, u.getFirstName(), u.getLastName(), email, position, labs);
|
||||
unregisteredUsers.add(myUser);
|
||||
}
|
||||
}
|
||||
|
@ -203,10 +203,10 @@ public class ManageUsersServiceImpl extends RemoteServiceServlet implements Man
|
|||
* @return the current group ID or null if an exception is thrown
|
||||
* @throws Exception
|
||||
*/
|
||||
private String getCurrentGroupID() {
|
||||
private long getCurrentGroupID() {
|
||||
ASLSession session = getASLSession();
|
||||
_log.debug("The current group NAME is --> " + session.getGroupName());
|
||||
String toReturn = null;
|
||||
long toReturn = -1;
|
||||
try {
|
||||
toReturn = groupM.getGroupId(session.getGroupName());
|
||||
} catch (UserManagementSystemException | GroupRetrievalFault e) {
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE web-app
|
||||
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
|
||||
<web-app>
|
||||
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
version="3.0">
|
||||
<!-- Servlets -->
|
||||
<servlet>
|
||||
<servlet-name>manageUsersServlet</servlet-name>
|
||||
|
|
Loading…
Reference in New Issue