bug fix #17269, SocialNetworking service passes wrong email sender in email notifications

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/branches/portal/social-networking-library-ws/2.2@181290 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2019-07-22 15:24:10 +00:00
parent fdf20e6b0f
commit 9e439c839b
5 changed files with 13 additions and 7 deletions

View File

@ -27,7 +27,7 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>

View File

@ -7,22 +7,22 @@
<dependent-module archiveName="portal-manager-2.4.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/portal-manager/portal-manager">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="social-util-library-1.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/social-util-library/social-util-library">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="pickitem-widget-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/pickitem-widget/pickitem-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="gcube-widgets-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="social-networking-library-1.16.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/social-networking-library/social-networking-library">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="usermanagement-core-2.4.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/usermanagement-core/usermanagement-core">
<dependent-module archiveName="usermanagement-core-2.4.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/usermanagement-core/usermanagement-core">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="notifications-common-library-1.4.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/notifications-common-library/notifications-common-library">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="aslsocial-1.5.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/applicationSupportLayerSocial/applicationSupportLayerSocial">
<dependent-module archiveName="aslsocial-1.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/applicationSupportLayerSocial/applicationSupportLayerSocial">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/social-networking-library-ws/target/classes"/>

View File

@ -1,4 +1,9 @@
<ReleaseNotes>
<Changeset
component="org.gcube.portal.social-networking-library-ws.2-2-4"
date="2019-07-22">
<Change>bug fix #17269, SocialNetworking service passes wrong email sender in email notifications</Change>
</Changeset>
<Changeset
component="org.gcube.portal.social-networking-library-ws.2-2-3"
date="2019-04-05">

View File

@ -13,7 +13,7 @@
<groupId>org.gcube.portal</groupId>
<artifactId>social-networking-library-ws</artifactId>
<packaging>war</packaging>
<version>2.2.3-SNAPSHOT</version>
<version>2.2.4-SNAPSHOT</version>
<name>social-networking-library-ws</name>
<description>Rest interface for the social networking library.</description>
<properties>

View File

@ -193,6 +193,7 @@ public class SocialNetworkingSiteFinder {
}else{
String siteName = matchingGateway.getGroupName();
String emailSender = (String)groupManager.readCustomAttr(matchingGateway.getGroupId(), EMAIL_SENDER_SITE_CUSTOM_FIELD);
emailSender = emailSender.replace("\"", ""); //this is because otherwise it would contains double quotes and postfix would use it as first part before @ e.g. senderEmail="aginfra@d4science.org"@d4science.org
String siteLandingPagePath = GCubePortalConstants.PREFIX_GROUP_URL + matchingGateway.getFriendlyURL();
String siteUrl = discoverHostOfServiceEndpoint(siteName);
SocialNetworkingSite site = new SocialNetworkingSite(siteName, emailSender, siteUrl, siteLandingPagePath);