REads the temppassord still neeeds to launch the event

This commit is contained in:
Massimiliano Assante 2020-07-23 12:41:35 +02:00
parent 67b3847b1e
commit 93aed9dc6e
4 changed files with 67 additions and 2 deletions

View File

@ -4,6 +4,9 @@
<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="invites-common-library-1.5.1-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="context-root" value="accept-invite-portlet"/>
<property name="java-output-path" value="/accept-invite-portlet/target/classes"/>
</wb-module>

19
pom.xml
View File

@ -37,13 +37,30 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId>
<version>LATEST</version>
<version>3.6.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>event-publisher-library</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>event-publisher-portal</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>social-networking-library</artifactId>

View File

@ -0,0 +1,44 @@
package org.gcube.portlets.user.acceptinvite;
import org.gcube.portal.event.publisher.lr62.PortalEvent;
import com.liferay.portal.security.auth.DefaultScreenNameGenerator;
public class CreateUserAccountEvent extends PortalEvent {
private static final long serialVersionUID = 1L;
public static final String EVENT_NAME = "invitation-accepted";
private String firstname;
private String surname;
private String email;
private String tempPwd;
private String username;
public CreateUserAccountEvent(String username, String firstname, String surname, String email, String tempPwd) {
super(EVENT_NAME);
DefaultScreenNameGenerator gen = new DefaultScreenNameGenerator();
// gen.generate(companyId, userId, emailAddress)
this.username = username;
this.firstname = firstname;
this.surname = surname;
this.email = email;
this.tempPwd = tempPwd;
}
public String getFirstname() {
return firstname;
}
public String getSurname() {
return surname;
}
public String getEmail() {
return email;
}
public String getTempPwd() {
return tempPwd;
}
public String getUsername() {
return username;
}
}

View File

@ -91,7 +91,8 @@
src="<%=renderRequest.getContextPath()%>/images/loader.gif" />
<c:choose>
<c:when test="${empty invitedUser}">
<c:out escapeXml="true"
value="${inviteInstance.controlCode}" />
To accept the invite, you can choose to create a new account by filling in the information below or
<a href="${academicRedirectURL}">sign up with your
academic/social account</a>.