Moved to liferay 6.2.5
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/create-users@128773 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9055ac1649
commit
4ac2e7d8c3
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/create-users-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/create-users-2.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
@ -46,5 +46,5 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/create-users-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/create-users-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets.admin.create-users.2-0-0"
|
||||
date="2016-05-31">
|
||||
<Change>Moved to Liferay 6.2.5</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets.admin.create-users.1-0-0"
|
||||
date="2016-03-28">
|
||||
<Change>First Release</Change>
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<groupId>org.gcube.portlets.admin</groupId>
|
||||
<artifactId>create-users</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<name>Create users portlet</name>
|
||||
<description>
|
||||
Create users portlet allows a VRE-Manager to enter user's personal data and automatically register he/she in the portal.
|
||||
|
@ -29,7 +29,7 @@
|
|||
<properties>
|
||||
<!-- Convenience property to set the GWT version -->
|
||||
<gwtVersion>2.7.0</gwtVersion>
|
||||
<liferayVersion>6.0.6</liferayVersion>
|
||||
<liferayVersion>6.2.5</liferayVersion>
|
||||
<!-- GWT needs at least java 1.6 -->
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
|
|
|
@ -67,9 +67,6 @@ public class CreateUsersPanel extends Composite {
|
|||
|
||||
// enlarge navTabs
|
||||
mainPanel.setWidth("100%");
|
||||
|
||||
// squeeze the form panel
|
||||
addUserSubPanel.setWidth("50%");
|
||||
|
||||
// require already registered users
|
||||
userServices.getAlreadyRegisterdUsers(new AsyncCallback<List<VreUserBean>>() {
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
@external .form-horizontal .control-label;
|
||||
.form-horizontal .control-label {
|
||||
margin-bottom: 15px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@external .form-horizontal .input-large;
|
||||
.form-horizontal .input-large {
|
||||
width: 95%;
|
||||
|
@ -88,14 +82,6 @@
|
|||
checked="true" ui:field="sendMailCheckbox"></b:CheckBox>
|
||||
</b:Controls>
|
||||
|
||||
<!-- <b:ControlLabel title="User's gender">Gender</b:ControlLabel> -->
|
||||
<!-- <b:Controls> -->
|
||||
<!-- <b:RadioButton b:id="gender" checked="true" title="Male" -->
|
||||
<!-- ui:field="maleCheckbox" name="gender">Male</b:RadioButton> -->
|
||||
<!-- <b:RadioButton b:id="gender" title="Female" -->
|
||||
<!-- ui:field="femaleCheckbox" name="gender">Female</b:RadioButton> -->
|
||||
<!-- </b:Controls> -->
|
||||
|
||||
<br></br>
|
||||
|
||||
<b:Controls>
|
||||
|
|
|
@ -21,8 +21,8 @@ import org.gcube.portlets.admin.createusers.shared.VreUserBean;
|
|||
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementPortalException;
|
||||
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.impl.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -215,14 +215,14 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
try{
|
||||
|
||||
PortalContext context = PortalContext.getConfiguration();
|
||||
String gatewayName = context.getGatewayName();
|
||||
String emailSender = context.getSenderEmail();
|
||||
String gatewayName = context.getGatewayName(getThreadLocalRequest());
|
||||
String emailSender = context.getSenderEmail(getThreadLocalRequest());
|
||||
|
||||
InternetAddress to = new InternetAddress(email);
|
||||
InternetAddress from = new InternetAddress(emailSender);
|
||||
|
||||
LiferayUserManager userManager = new LiferayUserManager();
|
||||
String portalUrl = PortalUtil.getPortalURL(getCompany().getVirtualHost(), 443, true);
|
||||
String portalUrl = PortalUtil.getPortalURL(getCompany().getVirtualHostname(), 443, true);
|
||||
String username = userManager.getFullNameFromEmail(email);
|
||||
|
||||
MailMessage mailMessage = new MailMessage();
|
||||
|
@ -314,6 +314,7 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
|
||||
// add in liferay too
|
||||
try{
|
||||
|
||||
GCubeUser user = userManager.createUser(
|
||||
true,
|
||||
"",
|
||||
|
@ -323,6 +324,7 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
surname,
|
||||
institution,
|
||||
"",
|
||||
"",
|
||||
isMale,
|
||||
null,
|
||||
null,
|
||||
|
@ -518,10 +520,10 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
* @return the current group ID or null if an exception is thrown
|
||||
* @throws Exception
|
||||
*/
|
||||
private String getCurrentGroupID() {
|
||||
private Long getCurrentGroupID() {
|
||||
ASLSession session = getASLSession();
|
||||
logger.debug("The current group NAME is --> " + session.getGroupName());
|
||||
String toReturn = null;
|
||||
Long toReturn = null;
|
||||
try {
|
||||
toReturn = new LiferayGroupManager().getGroupId(session.getGroupName());
|
||||
} catch (UserManagementSystemException | GroupRetrievalFault e) {
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
<inherits name="com.github.gwtbootstrap.Bootstrap" />
|
||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||
|
||||
<set-property name="bootstrap.responsiveDesign" value="true" />
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<entry-point class='org.gcube.portlets.admin.createusers.client.CreateUsers' />
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.0.0//EN" "http://www.liferay.com/dtd/liferay-display_6_0_0.dtd">
|
||||
|
||||
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.2.0//EN"
|
||||
"http://www.liferay.com/dtd/liferay-display_6_2_0.dtd">
|
||||
<display>
|
||||
<category name="gCube Social Apps">
|
||||
<portlet id="CreateUsers" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.0.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_0_0.dtd">
|
||||
|
||||
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.2.0//EN"
|
||||
"http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd">
|
||||
<liferay-portlet-app>
|
||||
<portlet>
|
||||
<portlet-name>CreateUsers</portlet-name>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?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>servlet</servlet-name>
|
||||
|
|
Loading…
Reference in New Issue