Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-podolskiy90 committed Aug 30, 2021
2 parents 50168c7 + 4359be0 commit ffd84e9
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 95 deletions.
22 changes: 11 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@

<properties>
<!-- Spring -->
<spring-boot.version>2.3.7.RELEASE</spring-boot.version>
<spring-boot.version>2.3.12.RELEASE</spring-boot.version>
<spring-boot-admin.version>2.2.4</spring-boot-admin.version>
<spring-cloud-openfeign.version>2.2.6.RELEASE</spring-cloud-openfeign.version>
<spring-cloud-zookeeper.version>2.2.4.RELEASE</spring-cloud-zookeeper.version>
<mybatis-spring-boot-starter.version>2.0.1</mybatis-spring-boot-starter.version>
<spring-cloud-zookeeper.version>2.2.5.RELEASE</spring-cloud-zookeeper.version>
<mybatis-spring-boot-starter.version>2.1.0</mybatis-spring-boot-starter.version>
<springdoc-openapi-ui.version>1.5.8</springdoc-openapi-ui.version>
<spring-cloud-sleuth.version>2.2.8.RELEASE</spring-cloud-sleuth.version>

Expand All @@ -90,11 +90,11 @@
<gbif-common.version>0.50</gbif-common.version>
<gbif-common-mybatis.version>1.1</gbif-common-mybatis.version>
<gbif-common-ws.version>1.15</gbif-common-ws.version>
<gbif-directory.version>1.10</gbif-directory.version>
<gbif-directory.version>1.11</gbif-directory.version>
<gbif-doi.version>2.14</gbif-doi.version>
<gbif-download-query-tools.version>1.42</gbif-download-query-tools.version>
<gbif-httputils.version>0.10</gbif-httputils.version>
<gbif-metrics.version>1.0</gbif-metrics.version>
<gbif-metrics.version>1.2</gbif-metrics.version>
<gbif-parsers.version>0.36</gbif-parsers.version>
<gbif-postal-service.version>1.1</gbif-postal-service.version>
<xoai.version>4.1.0-gbif-4</xoai.version>
Expand All @@ -105,11 +105,11 @@
<commons-validator.version>1.5.1</commons-validator.version>
<commons-io.version>2.5</commons-io.version>
<commons-logging.version>1.2</commons-logging.version>
<cache2k.version>1.2.0.Final</cache2k.version>
<cache2k.version>2.0.0.Final</cache2k.version>
<elasticsearch.version>7.9.1</elasticsearch.version>
<feign.version>10.11</feign.version>
<findbugs-jsr305.version>3.0.1</findbugs-jsr305.version>
<guava.version>17.0</guava.version>
<guava.version>18.0</guava.version>
<hadoop.version>2.6.0-cdh5.16.2</hadoop.version>
<hikaricp.version>3.2.0</hikaricp.version>
<janino-logback.version>2.5.10</janino-logback.version>
Expand All @@ -118,10 +118,10 @@
<jsr311-api.version>1.1.1</jsr311-api.version>
<logback.version>1.2.3</logback.version>
<logstash-logback-encoder.version>4.11</logstash-logback-encoder.version>
<lombok.version>1.18.10</lombok.version>
<lombok.version>1.18.20</lombok.version>
<mybatis.version>3.5.0</mybatis.version>
<okhttp.version>3.11.0</okhttp.version>
<okio.version>2.0.0</okio.version>
<okhttp.version>4.9.1</okhttp.version>
<okio.version>2.10.0</okio.version>
<retrofit.version>2.8.0</retrofit.version>
<slf4j.version>1.7.30</slf4j.version>
<woodstox.version>4.4.1</woodstox.version>
Expand Down Expand Up @@ -605,7 +605,7 @@
<!-- Caching -->
<dependency>
<groupId>org.cache2k</groupId>
<artifactId>cache2k-jcache</artifactId>
<artifactId>cache2k-core</artifactId>
<version>${cache2k.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ message:
identity:
surety:
mail:
supportedLocales: en,ru,es,fr
urlTemplate:
confirmUser: https://demo.gbif-dev.org/{0}/user/confirm?username={1}&code={2}
resetPassword: https://demo.gbif-dev.org/{0}/user/confirm?username={1}&code={2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,25 @@
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
@ConfigurationProperties(prefix = "identity.surety.mail")
public class IdentitySuretyMailConfigurationProperties {

private List<String> supportedLocales = new ArrayList<>();

private UrlTemplateProperties urlTemplate;

public List<String> getSupportedLocales() {
return supportedLocales;
}

public void setSupportedLocales(List<String> supportedLocales) {
this.supportedLocales = supportedLocales;
}

public UrlTemplateProperties getUrlTemplate() {
return urlTemplate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@
@Service
public class IdentityEmailManager {

// supported locales
private static final List<String> SUPPORTED_LOCALES = Arrays.asList("en", "ru");

private final EmailTemplateProcessor emailTemplateProcessor;
private final IdentitySuretyMailConfigurationProperties identityMailConfigProperties;
private final String doiUrl;
Expand Down Expand Up @@ -246,6 +243,7 @@ private String getOrEmptyLocaleTag(Locale locale) {
}

private String findSuitableLocaleTagAmongAvailable(Locale locale) {
return Locale.lookupTag(Locale.LanguageRange.parse(locale.toLanguageTag()), SUPPORTED_LOCALES);
return Locale.lookupTag(Locale.LanguageRange.parse(locale.toLanguageTag()),
identityMailConfigProperties.getSupportedLocales());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
"type": "org.gbif.registry.mail.config.IdentitySuretyMailConfigurationProperties",
"sourceType": "org.gbif.registry.mail.config.IdentitySuretyMailConfigurationProperties"
},
{
"name": "identity.surety.mail.supportedLocales",
"type": "org.gbif.registry.mail.config.IdentitySuretyMailConfigurationProperties",
"sourceType": "org.gbif.registry.mail.config.IdentitySuretyMailConfigurationProperties"
},
{
"name": "identity.surety.mail.urlTemplate",
"type": "org.gbif.registry.mail.config.IdentitySuretyMailConfigurationProperties",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@
<#list contact.email as email>
<a href="mailto:${email}" style="margin: 0;padding: 0;line-height: 1.65;color: #4ba2ce;text-decoration: none;">${email}</a><#if email_has_next>, </#if>
</#list>

${contact.email?join(", ")}
</li>
</#if>
<#if contact.phone?has_content>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<#-- @ftlvariable name="" type="org.gbif.registry.domain.mail.AccountDeleteDataModel" -->
<#include "header.ftl">

<h4 style="margin: 0 0 20px;padding: 0;font-size: 20px;line-height: 1.25;">Dear ${name},</h4>
<h5 style="margin: 0 0 20px;padding: 0;font-size: 16px;line-height: 1.25;">Dear ${name},</h5>

<p style="margin: 0 0 20px;padding: 0;line-height: 1.65;">
Your GBIF.org account
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 12 additions & 3 deletions registry-mail/src/main/resources/email/templates/header.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<meta name="ProgId" content="Word.Document">
<style>
a:not(.button) {
color: #4ba2ce;
text-decoration: none;
}
a:not(.button):hover {
color: #2c79a1 !important;
text-decoration: underline !important;
}
</style>
</head>
<#-- TODO: Add this to body tag once arabic is ready-->
<#--<#if .locale == "ar">dir="rtl" lang="ar"</#if>-->
<body style="margin: 0;padding: 0;font-size: 14px;color: #4E565F;font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;line-height: 1.65;height: 100%;background: #f8f8f8;width: 100% !important;">
<body <#if .locale == "ar">dir="rtl" lang="ar"</#if> style="margin: 0;padding: 0;font-size: 14px;color: #4E565F;font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;line-height: 1.65;height: 100%;background: #f8f8f8;width: 100% !important;">

<table style="margin: 0;padding: 20px 0 0 0;height: 100%;background: #f8f8f8;width: 100% !important;">
<!-- Main message -->
Expand Down
2 changes: 1 addition & 1 deletion registry-search/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
</dependency>
<dependency>
<groupId>org.cache2k</groupId>
<artifactId>cache2k-jcache</artifactId>
<artifactId>cache2k-core</artifactId>
</dependency>
<dependency>
<groupId>org.cache2k</groupId>
Expand Down
5 changes: 4 additions & 1 deletion registry-ws/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ message:
identity:
surety:
mail:
supportedLocales: en,ru,es,fr
urlTemplate:
confirmUser: https://demo.gbif-dev.org/{0}/user/confirm?username={1}&code={2}
resetPassword: https://demo.gbif-dev.org/{0}/user/confirm?username={1}&code={2}
Expand All @@ -51,6 +52,8 @@ application:
grscicoll:
portal:
url: https://www.gbif-dev.org/grscicoll/
registryPortal:
url: https://registry.gbif-dev.org/

derivedDataset:
text: Derived dataset GBIF.org ({0}) Filtered export of GBIF occurrence data https://doi.org/{1}
Expand Down Expand Up @@ -151,7 +154,7 @@ spring:
# Liquibase
liquibase:
change-log: classpath:liquibase/master.xml
enabled: true
enabled: false
default-schema: public
# Mail
mail:
Expand Down

0 comments on commit ffd84e9

Please sign in to comment.