Compare commits
1 Commits
master
...
Feature/26
Author | SHA1 | Date |
---|---|---|
Ahmed Salah Tawfik Ibrahim | 207d05dec1 |
|
@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
## [v3.7.3] - 2022-01-03
|
## [v3.7.3] - 2022-01-03
|
||||||
|
|
||||||
- Make the motivation mandatory when someone asks to join a VRE
|
- Make the motivation mandatory when someone asks to join a VRE
|
||||||
|
- Removed social networking library dependency #26531
|
||||||
|
|
||||||
## [v3.7.2] - 2021-04-30
|
## [v3.7.2] - 2021-04-30
|
||||||
|
|
||||||
|
|
11
pom.xml
11
pom.xml
|
@ -86,9 +86,16 @@
|
||||||
<artifactId>invites-common-library</artifactId>
|
<artifactId>invites-common-library</artifactId>
|
||||||
<version>[1.4.0, 2.0.0-SNAPSHOT)</version>
|
<version>[1.4.0, 2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--needs to be provided -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portal</groupId>
|
<groupId>org.gcube.social-networking</groupId>
|
||||||
<artifactId>social-networking-library</artifactId>
|
<artifactId>social-service-model</artifactId>
|
||||||
|
<version>[1.2.0-SNAPSHOT, 2.0.0)</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.social-networking</groupId>
|
||||||
|
<artifactId>social-service-client</artifactId>
|
||||||
|
<version>[2.0.0-SNAPSHOT, 3.0.0)</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portal.databook.shared.UserInfo;
|
import org.gcube.social_networking.socialnetworking.model.shared.UserInfo;
|
||||||
import org.gcube.portlets.user.joinvre.shared.TabbedPage;
|
import org.gcube.portlets.user.joinvre.shared.TabbedPage;
|
||||||
import org.gcube.portlets.user.joinvre.shared.VRE;
|
import org.gcube.portlets.user.joinvre.shared.VRE;
|
||||||
import org.gcube.portlets.user.joinvre.shared.VRECategory;
|
import org.gcube.portlets.user.joinvre.shared.VRECategory;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portal.databook.shared.UserInfo;
|
import org.gcube.social_networking.socialnetworking.model.shared.UserInfo;
|
||||||
import org.gcube.portlets.user.joinvre.shared.TabbedPage;
|
import org.gcube.portlets.user.joinvre.shared.TabbedPage;
|
||||||
import org.gcube.portlets.user.joinvre.shared.VRE;
|
import org.gcube.portlets.user.joinvre.shared.VRE;
|
||||||
import org.gcube.portlets.user.joinvre.shared.VRECategory;
|
import org.gcube.portlets.user.joinvre.shared.VRECategory;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package org.gcube.portlets.user.joinvre.client.ui;
|
package org.gcube.portlets.user.joinvre.client.ui;
|
||||||
|
|
||||||
import org.gcube.portal.databook.shared.UserInfo;
|
import org.gcube.social_networking.socialnetworking.model.shared.UserInfo;
|
||||||
import org.gcube.portlets.user.joinvre.client.JoinService;
|
import org.gcube.portlets.user.joinvre.client.JoinService;
|
||||||
import org.gcube.portlets.user.joinvre.client.JoinServiceAsync;
|
import org.gcube.portlets.user.joinvre.client.JoinServiceAsync;
|
||||||
import org.gcube.portlets.user.joinvre.shared.VRE;
|
import org.gcube.portlets.user.joinvre.shared.VRE;
|
||||||
|
|
|
@ -11,11 +11,10 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.gcube.common.portal.GCubePortalConstants;
|
import org.gcube.common.portal.GCubePortalConstants;
|
||||||
import org.gcube.common.portal.PortalContext;
|
import org.gcube.common.portal.PortalContext;
|
||||||
import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl;
|
import org.gcube.social_networking.social_networking_client_library.LibClient;
|
||||||
import org.gcube.portal.databook.server.DatabookStore;
|
import org.gcube.social_networking.socialnetworking.model.shared.Invite;
|
||||||
import org.gcube.portal.databook.shared.Invite;
|
import org.gcube.social_networking.socialnetworking.model.shared.InviteStatus;
|
||||||
import org.gcube.portal.databook.shared.InviteStatus;
|
import org.gcube.social_networking.socialnetworking.model.shared.UserInfo;
|
||||||
import org.gcube.portal.databook.shared.UserInfo;
|
|
||||||
import org.gcube.portal.tou.TermsOfUse;
|
import org.gcube.portal.tou.TermsOfUse;
|
||||||
import org.gcube.portal.tou.TermsOfUseImpl;
|
import org.gcube.portal.tou.TermsOfUseImpl;
|
||||||
import org.gcube.portal.tou.exceptions.ToUNotFoundException;
|
import org.gcube.portal.tou.exceptions.ToUNotFoundException;
|
||||||
|
@ -59,7 +58,7 @@ import com.liferay.portal.util.PortalUtil;
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class JoinServiceImpl extends RemoteServiceServlet implements JoinService {
|
public class JoinServiceImpl extends RemoteServiceServlet implements JoinService {
|
||||||
private static Log _log = LogFactoryUtil.getLog(JoinServiceImpl.class);
|
private static Log _log = LogFactoryUtil.getLog(JoinServiceImpl.class);
|
||||||
private static DatabookStore store;
|
private static LibClient libClient;
|
||||||
public static final String PREFIX_PUBLIC_URL = "/web";
|
public static final String PREFIX_PUBLIC_URL = "/web";
|
||||||
//tell whether the
|
//tell whether the
|
||||||
public static final String TABBED_LAYOUT_ATTRIBUTE = "TabbedLayout";
|
public static final String TABBED_LAYOUT_ATTRIBUTE = "TabbedLayout";
|
||||||
|
@ -100,7 +99,7 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
||||||
public UserInfo readInvite(final String inviteId, final long siteId) {
|
public UserInfo readInvite(final String inviteId, final long siteId) {
|
||||||
initStore();
|
initStore();
|
||||||
try {
|
try {
|
||||||
Invite invite = store.readInvite(inviteId);
|
Invite invite = libClient.readInviteLib(inviteId);
|
||||||
GCubeUser inviter = new LiferayUserManager().getUserByUsername(invite.getSenderUserId());
|
GCubeUser inviter = new LiferayUserManager().getUserByUsername(invite.getSenderUserId());
|
||||||
return new UserInfo(
|
return new UserInfo(
|
||||||
inviter.getUsername(),
|
inviter.getUsername(),
|
||||||
|
@ -629,10 +628,10 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
||||||
_log.info("fakeRequest accepted");
|
_log.info("fakeRequest accepted");
|
||||||
if (isInvitation) {
|
if (isInvitation) {
|
||||||
initStore();
|
initStore();
|
||||||
String inviteId = store.isExistingInvite(scope, currUser.getEmail());
|
String inviteId = libClient.isExistingInviteLib(scope, currUser.getEmail());
|
||||||
if (inviteId != null) {
|
if (inviteId != null) {
|
||||||
Invite invite = store.readInvite(inviteId);
|
Invite invite = libClient.readInviteLib(inviteId);
|
||||||
store.setInviteStatus(scope, currUser.getEmail(), InviteStatus.ACCEPTED);
|
libClient.setInviteStatusLib(scope, currUser.getEmail(), InviteStatus.ACCEPTED);
|
||||||
LoginServiceUtil.notifyUserAcceptedInvite(currUser.getUsername(), scope, invite, getThreadLocalRequest());
|
LoginServiceUtil.notifyUserAcceptedInvite(currUser.getUsername(), scope, invite, getThreadLocalRequest());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -657,11 +656,15 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
||||||
*
|
*
|
||||||
* @return the unique instance of the store
|
* @return the unique instance of the store
|
||||||
*/
|
*/
|
||||||
public static synchronized DatabookStore initStore() {
|
public static synchronized LibClient initStore() {
|
||||||
if (store == null) {
|
if (libClient == null) {
|
||||||
store = new DBCassandraAstyanaxImpl();
|
try {
|
||||||
|
libClient = new LibClient();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
return store;
|
}
|
||||||
|
return libClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -679,7 +682,7 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
_log.debug("checking if invite exists for " + email + " on " +infraScope);
|
_log.debug("checking if invite exists for " + email + " on " +infraScope);
|
||||||
return store.isExistingInvite(infraScope, email);
|
return libClient.isExistingInviteLib(infraScope, email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Set;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.gcube.common.portal.PortalContext;
|
import org.gcube.common.portal.PortalContext;
|
||||||
import org.gcube.portal.databook.shared.Invite;
|
import org.gcube.social_networking.socialnetworking.model.shared.Invite;
|
||||||
import org.gcube.portal.mailing.message.Recipient;
|
import org.gcube.portal.mailing.message.Recipient;
|
||||||
import org.gcube.portal.mailing.service.EmailTemplateService;
|
import org.gcube.portal.mailing.service.EmailTemplateService;
|
||||||
import org.gcube.portal.mailing.templates.TemplateUserAcceptedInvite;
|
import org.gcube.portal.mailing.templates.TemplateUserAcceptedInvite;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<inherits name='com.google.gwt.activity.Activity' />
|
<inherits name='com.google.gwt.activity.Activity' />
|
||||||
<inherits name="com.github.gwtbootstrap.Bootstrap" />
|
<inherits name="com.github.gwtbootstrap.Bootstrap" />
|
||||||
<inherits name='org.gcube.portal.databook.GCubeSocialNetworking' />
|
<inherits name='org.gcube.social_networking.socialnetworking.model.GCubeSocialNetworking' />
|
||||||
<!-- only build for Chrome -->
|
<!-- only build for Chrome -->
|
||||||
<!-- <set-property name="user.agent" value="safari" /> -->
|
<!-- <set-property name="user.agent" value="safari" /> -->
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
|
|
Loading…
Reference in New Issue