Skip to content

Commit

Permalink
Merge pull request #270 from ec-jrc/develop
Browse files Browse the repository at this point in the history
2.4.2 Release
  • Loading branch information
unaibrrgn authored Mar 31, 2023
2 parents 0da91c5 + 1ba3cd4 commit 236f74c
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 22 deletions.
10 changes: 7 additions & 3 deletions dist/webapp/public_html/conf/conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@

var registryApp = {};

// The default language of the app (used as a fallback if the language is not
// The default language of the app (used as a fallback if the language is not
// passed by URL or cannot be retrieved by Browser language)
registryApp.defaultLanguage = 'en';

// Search maximum results per page
registryApp.maxSearchResultsPerPage = 10;

// Force http URIs (even if the original call has https URIs)
registryApp.forceHttpURIs=true;
registryApp.forceHttpURIs = true;

// The app's base URL
// Default Error message parameters (Change if needed to your own repository or link)
registryApp.errorMessageDefinition = "Re3gistry Software repository";
registryApp.errorMessageURL = "https://github.com/ec-jrc/re3gistry";

// The app's base URLs
registryApp.domainURL = '//registry-test.eu';
registryApp.hostURL = '//registry-test.eu/registry';
registryApp.searchURL = '//registry-test.eu/registry/search';
Expand Down
20 changes: 10 additions & 10 deletions sources/Re3gistry2-build-helper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
<properties>
<profile.id>developer-docker</profile.id>
<persistence.db.port>5432</persistence.db.port>
<persistence.db.address>host.docker.internal</persistence.db.address>
<persistence.db.name>registrydb</persistence.db.name>
<persistence.jdbc.username>name</persistence.jdbc.username>
<persistence.jdbc.password>password</persistence.jdbc.password>
<persistence.db.address>DB_ADDRESS</persistence.db.address>
<persistence.db.name>re3gistry2_dev</persistence.db.name>
<persistence.jdbc.username>DB_USERNAME</persistence.jdbc.username>
<persistence.jdbc.password>DB_PASSWORD</persistence.jdbc.password>
<persistence.jdbc.url>jdbc:postgresql://${persistence.db.address}:${persistence.db.port}/${persistence.db.name}</persistence.jdbc.url>
<application.login.provider>SHIRO</application.login.provider>
<application.rooturl>http://localhost/re3gistry2/</application.rooturl>
Expand All @@ -67,13 +67,13 @@
<application.logging.path>work/registrylogger.log</application.logging.path>
<application.privacy>OFF</application.privacy>
<application.selected.interface>ecl</application.selected.interface>
<mail.smtp.host>localhost</mail.smtp.host>
<mail.smtp.port>2500</mail.smtp.port>
<mail.smtp.host>example-smtp.eu</mail.smtp.host>
<mail.smtp.port>25</mail.smtp.port>
<mail.smtp.auth>false</mail.smtp.auth>
<mail.smtp.starttls.enable>false</mail.smtp.starttls.enable>
<mail.user>name</mail.user>
<mail.password>password</mail.password>
<mail.sender>admin@example.com</mail.sender>
<mail.smtp.starttls.enable>true</mail.smtp.starttls.enable>
<mail.user></mail.user>
<mail.password></mail.password>
<mail.sender>sender@example.eu</mail.sender>
<web.session.cookie.secure>false</web.session.cookie.secure>
<application.selected.interface>neutral</application.selected.interface>
<application.legacy.flag>ON</application.legacy.flag>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import eu.europa.ec.re3gistry2.base.utility.BaseConstants;
import eu.europa.ec.re3gistry2.base.utility.Configuration;
import eu.europa.ec.re3gistry2.base.utility.MailManager;
import eu.europa.ec.re3gistry2.base.utility.PersistenceFactory;
import eu.europa.ec.re3gistry2.base.utility.WebConstants;
import eu.europa.ec.re3gistry2.crudimplementation.RegUserCodesManager;
Expand All @@ -18,6 +19,7 @@
import eu.europa.ec.re3gistry2.model.RegUserRegGroupMapping;
import java.io.IOException;
import java.util.List;
import java.util.ResourceBundle;
import javax.persistence.EntityManager;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
Expand Down Expand Up @@ -64,6 +66,10 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
for(RegUserCodes r:regCodeAux){
regUserCodesHandler.deleteCode(r);
}

ResourceBundle systemLocalization = Configuration.getInstance().getLocalization();
MailManager.sendUserActivatedEmail(regUser, systemLocalization);

request.getRequestDispatcher(WebConstants.PAGE_JSP_FOLDER + WebConstants.PAGE_PATH_ACTIVATE+ WebConstants.PAGE_URINAME_ACTIVATE + WebConstants.PAGE_JSP_EXTENSION).forward(request, response);
}else{
//Dispatch request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
application.persistenceunitname=Re3gistry2

# Application version
application.version=Version: 2.4.1
application.version=Version: 2.4.2

# Localization
application.language.available=en
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
<div class="ecl-container ecl-footer-standardised__container">
<section class="ecl-footer-core__section ecl-footer-core__section1">
<a href="https://github.com/ec-jrc/re3gistry/releases"
class="ecl-footer-core__title ecl-link ecl-link--standalone">Re3gistry version 2.3.0</a>
class="ecl-footer-core__title ecl-link ecl-link--standalone">Re3gistry version 2.4.2</a>
<div class="ecl-footer-core__description"><a data-i18n-link="l-ec-website" class="ecl-link ecl-link--standalone"
href="https://inspire-sandbox.jrc.ec.europa.eu/registry"
aria-label="European Commission">
<img class="mt-2" src="./res/img/logo-2.png" alt="" width="30%" height="50%">
<img class="mt-2" src="./res/img/logo-2.png" alt="">
</a></div>
<div class="ecl-footer-core__description">Reference codes management tool</div>
</section>
Expand All @@ -45,6 +45,7 @@
<li class="ecl-footer-standardised__list-item"><a href="https://joinup.ec.europa.eu/collection/are3na/solution/re3gistry/about" class="ecl-footer-standardised__link ecl-link ecl-link--standalone">Re3gistry features</a></li>
<li class="ecl-footer-standardised__list-item"><a href="https://github.com/ec-jrc/re3gistry/releases" class="ecl-footer-standardised__link ecl-link ecl-link--standalone">Get the code</a></li>
<li class="ecl-footer-standardised__list-item"><a href="https://joinup.ec.europa.eu/collection/are3na/solution/re3gistry/best-practices-registers-and-registries" class="ecl-footer-standardised__link ecl-link ecl-link--standalone">Best practices</a></li>
<li class="ecl-footer-standardised__list-item"><a href="https://ec.europa.eu/eusurvey/runner/Re3gistry_Survey" class="ecl-footer-standardised__link ecl-link ecl-link--standalone">Fill the survey</a></li>
</ul>
</section>
<section class="ecl-footer-standardised__section">
Expand Down
Binary file modified sources/Re3gistry2/src/main/webapp/res/img/logo-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import eu.europa.ec.re3gistry2.model.RegAction;
import eu.europa.ec.re3gistry2.model.RegItemproposed;
import eu.europa.ec.re3gistry2.model.RegUser;
import java.security.InvalidParameterException;
import java.util.ArrayList;
import java.util.Date;
Expand Down Expand Up @@ -230,4 +231,21 @@ public static void sendActionMail(List<RegItemproposed> regItemproposeds, RegAct

}
}

public static void sendUserActivatedEmail(RegUser user, ResourceBundle systemLocalization) throws AddressException{
LinkedHashSet<InternetAddress> users = new LinkedHashSet<>();
users.add(new InternetAddress(user.getEmail()));
InternetAddress[] recipient = new InternetAddress[users.size()];
users.toArray(recipient);
try {
String subject= " User has been successfully activated";
String body= " </br> The user "+user.getName()+" has been successfully activated and can now be freely used.</br>";
MailManager.sendMail(recipient, subject, body);
} catch (InvalidParameterException ex) {
java.util.logging.Logger.getLogger(MailManager.class.getName()).log(Level.SEVERE, null, ex);
} catch (MessagingException ex) {
java.util.logging.Logger.getLogger(MailManager.class.getName()).log(Level.SEVERE, null, ex);
}

}
}
2 changes: 1 addition & 1 deletion sources/Re3gistry2ServiceWebapp/public_html/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ <h3 class="ecl-accordion2__title"><button type="button" class="ecl-accordion2__t
<div class="ecl-container ecl-footer-standardised__container">
<section class="ecl-footer-core__section ecl-footer-core__section1">
<a href="https://github.com/ec-jrc/re3gistry/releases"
class="ecl-footer-core__title ecl-link ecl-link--standalone">Re3gistry version 2.3.0</a>
class="ecl-footer-core__title ecl-link ecl-link--standalone">Re3gistry version 2.4.2</a>
<div class="ecl-footer-core__description"><a data-i18n-link="l-ec-website" class="ecl-link ecl-link--standalone"
href="https://inspire-sandbox.jrc.ec.europa.eu/registry"
aria-label="European Commission">
Expand Down
6 changes: 3 additions & 3 deletions sources/Re3gistry2ServiceWebapp/public_html/conf/conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@

var registryApp = {};

// The default language of the app (used as a fallback if the language is not
// The default language of the app (used as a fallback if the language is not
// passed by URL or cannot be retrieved by Browser language)
registryApp.defaultLanguage = 'en';

// Search maximum results per page
registryApp.maxSearchResultsPerPage = 10;

// Force http URIs (even if the original call has https URIs)
registryApp.forceHttpURIs=true;
registryApp.forceHttpURIs = true;

// Default Error message parameters (Change if needed to your own repository or link)
registryApp.errorMessageDefinition = "Re3gistry Software repository";
registryApp.errorMessageURL = "https://github.com/ec-jrc/re3gistry";

// The app's base URL
// The app's base URLs
registryApp.domainURL = '//registry-test.eu';
registryApp.hostURL = '//registry-test.eu/registry';
registryApp.searchURL = '//registry-test.eu/registry/search';
Expand Down
2 changes: 1 addition & 1 deletion sources/Re3gistry2ServiceWebapp/public_html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h2 class="ecl-u-type-heading-2 ecl-u-mt-none ecl-u-mb-l" id="page-title">Regist
<div class="ecl-container ecl-footer-standardised__container">
<section class="ecl-footer-core__section ecl-footer-core__section1">
<a href="https://github.com/ec-jrc/re3gistry/releases"
class="ecl-footer-core__title ecl-link ecl-link--standalone">Re3gistry version 2.3.0</a>
class="ecl-footer-core__title ecl-link ecl-link--standalone">Re3gistry version 2.4.2</a>
<div class="ecl-footer-core__description"><a data-i18n-link="l-ec-website" class="ecl-link ecl-link--standalone"
href="https://inspire-sandbox.jrc.ec.europa.eu/registry"
aria-label="European Commission">
Expand Down
2 changes: 1 addition & 1 deletion sources/Re3gistry2ServiceWebapp/public_html/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h3 class="ecl-u-type-heading-3 ecl-u-type-color-black ecl-u-mb-none ecl-u-mt-3x
<div class="ecl-container ecl-footer-standardised__container">
<section class="ecl-footer-core__section ecl-footer-core__section1">
<a href="https://github.com/ec-jrc/re3gistry/releases"
class="ecl-footer-core__title ecl-link ecl-link--standalone">Re3gistry version 2.3.0</a>
class="ecl-footer-core__title ecl-link ecl-link--standalone">Re3gistry version 2.4.2</a>
<div class="ecl-footer-core__description"><a data-i18n-link="l-ec-website" class="ecl-link ecl-link--standalone"
href="https://inspire-sandbox.jrc.ec.europa.eu/registry"
aria-label="European Commission">
Expand Down

0 comments on commit 236f74c

Please sign in to comment.