Skip to content

Commit

Permalink
Merge branch 'main' into feat/ui-docker-container-builds
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro authored Jan 28, 2025
2 parents d1d33f9 + 0f95b8b commit 2ae049e
Show file tree
Hide file tree
Showing 17 changed files with 184 additions and 47 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## v2.70.10 - 2025-01-27

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.70.9...v2.70.10)

- [#7193](https://github.com/ORCID/ORCID-Source/pull/7193): Add affiliation after reactivation

## v2.70.9 - 2025-01-27

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.70.8...v2.70.9)

## v2.70.8 - 2025-01-27

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.70.7...v2.70.8)

## v2.70.7 - 2025-01-27

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.70.6...v2.70.7)

## v2.70.6 - 2025-01-23

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.70.5...v2.70.6)

- [#7189](https://github.com/ORCID/ORCID-Source/pull/7189): Added the check for existent entries

## v2.70.5 - 2025-01-22

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.70.4...v2.70.5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public class PapiRateLimitRedisClient {
@Value("${org.orcid.papi.rate.limit.redisCacheExpiryInSec:172800}")
private int CASH_EXPIRY_IN_SECONDS; // caching for 2 days to have time to
// synch with DB

@Value("${org.orcid.papi.rate.limit.checkExistentEntries:false}")
private boolean CHECK_DUPLICATES ; // if the scheduled job is less than one day, or we run the job twice we need to check for duplicates.

@Autowired
private PublicApiDailyRateLimitDao papiRateLimitingDao;
Expand Down Expand Up @@ -71,8 +74,24 @@ public void setTodayLimitsForClient(String client, JSONObject metaData) {
public void saveRedisPapiLimitDateToDB(LocalDate requestDate) throws JSONException {
// returns all the keys for requestDate
HashMap<String, JSONObject> allValuesForKey = redisClient.getAllValuesForKeyPattern("*" + requestDate.toString());
for (String key : allValuesForKey.keySet()) {
papiRateLimitingDao.persist(redisObjJsonToEntity(allValuesForKey.get(key)));
for (String key : allValuesForKey.keySet()) {
PublicApiDailyRateLimitEntity redisRateLimitEntity = redisObjJsonToEntity(allValuesForKey.get(key));
PublicApiDailyRateLimitEntity pgRateLimitEntity = null;
boolean isClient = false;
if(CHECK_DUPLICATES) {
if(StringUtils.isNotEmpty(redisRateLimitEntity.getIpAddress())) {
pgRateLimitEntity = papiRateLimitingDao.findByIpAddressAndRequestDate(redisRateLimitEntity.getIpAddress(), requestDate);
}
else if(StringUtils.isNotEmpty(redisRateLimitEntity.getClientId())){
pgRateLimitEntity = papiRateLimitingDao.findByClientIdAndRequestDate(redisRateLimitEntity.getClientId(), requestDate);
isClient = true;
}
}
if(pgRateLimitEntity != null) {
papiRateLimitingDao.updatePublicApiDailyRateLimit(pgRateLimitEntity, isClient);
} else {
papiRateLimitingDao.persist(redisObjJsonToEntity(allValuesForKey.get(key)));
}
redisClient.remove(key);
}
}
Expand Down
10 changes: 10 additions & 0 deletions orcid-core/src/main/java/org/orcid/pojo/ajaxForm/Registration.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.orcid.pojo.ajaxForm;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -54,6 +56,8 @@ public class Registration implements ErrorsInterface, Serializable {

private AffiliationForm affiliationForm;

private boolean isReactivation;

public Registration() {
errors = new ArrayList<String>();
password = new Text();
Expand All @@ -74,6 +78,7 @@ public Registration() {
sendEmailFrequencyDays = new Text();
grecaptcha = new Text();
grecaptchaWidgetId = new Text();
isReactivation = false;
}

public List<String> getErrors() {
Expand Down Expand Up @@ -251,4 +256,9 @@ public AffiliationForm getAffiliationForm() {
public void setAffiliationForm(AffiliationForm affiliationForm) {
this.affiliationForm = affiliationForm;
}

public boolean isReactivation() { return isReactivation; }

@JsonProperty("isReactivation")
public void setReactivation(boolean isReactivation) { this.isReactivation = isReactivation; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# reactivation_email

email.reactivation.thank_you=Thank you for choosing to reactivate your ORCID record.\n
email.reactivation.thank_you_message=Thank you for choosing to reactivate your ORCID account.\n
email.reactivation.to_reactivate=Please click on the link below to complete the reactivation process.\n\
This will take you to a new web page where you will need to enter your\n\
first name and last name, and create a password.\n
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
papi.rate.limit.subject=[ORCID-API] WARNING! You have exceeded the daily Public API Usage Limit - ({0})
papi.rate.limit.important.msg=This is an important message to let you know that you have exceeded your
papi.rate.limit.daily.usage.limit=daily Public API usage limit
papi.rate.limit.your.integration=with your integration:
papi.rate.limit.client.name=Client Name:
papi.rate.limit.client.id=Client ID:
papi.rate.limit.please.remember=Please remember that the ORCID Public API is free for non-commercial use by individuals as stated in the
papi.rate.limit.public.api.terms=Public APIs Terms of Service
papi.rate.limit.by.non.commercial=By "non-commercial" we mean that you may not charge any re-use fees for the Public API, and you may not make use of the Public API in connection with any revenue-generating product or service.
papi.rate.limit.based.on.your=Based on your API usage, we highly recommend you consider becoming an ORCID member for access to our
papi.rate.limit.member.api=Member API
papi.rate.limit.not.only=Not only will it allow you to access a higher Rate Limits and an unrestricted Usage Quota, but you will be able to access Trusted Party data in ORCID records and contribute data to ORCID records from your institutional systems
papi.rate.limit.to.minimize=To minimize any disruption to your ORCID integration in the future, we would recommend that you reach out to our Engagement Team by replying to this email to discuss our ORCID membership options.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
papi.rate.limit.subject=LR
papi.rate.limit.important.msg=LR
papi.rate.limit.daily.usage.limit=LR
papi.rate.limit.your.integration=LR
papi.rate.limit.client.name=LR
papi.rate.limit.client.id=LR
papi.rate.limit.please.remember=LR
papi.rate.limit.public.api.terms=LR
papi.rate.limit.by.non.commercial=LR
papi.rate.limit.based.on.your=LR
papi.rate.limit.member.api=LR
papi.rate.limit.not.only=LR
papi.rate.limit.to.minimize=LR
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
papi.rate.limit.subject=RL
papi.rate.limit.important.msg=RL
papi.rate.limit.daily.usage.limit=RL
papi.rate.limit.your.integration=RL
papi.rate.limit.client.name=RL
papi.rate.limit.client.id=RL
papi.rate.limit.please.remember=RL
papi.rate.limit.public.api.terms=RL
papi.rate.limit.by.non.commercial=RL
papi.rate.limit.based.on.your=RL
papi.rate.limit.member.api=RL
papi.rate.limit.not.only=RL
papi.rate.limit.to.minimize=RL
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
papi.rate.limit.subject=XX
papi.rate.limit.important.msg=XX
papi.rate.limit.daily.usage.limit=XX
papi.rate.limit.your.integration=XX
papi.rate.limit.client.name=XX
papi.rate.limit.client.id=XX
papi.rate.limit.please.remember=XX
papi.rate.limit.public.api.terms=XX
papi.rate.limit.by.non.commercial=XX
papi.rate.limit.based.on.your=XX
papi.rate.limit.member.api=XX
papi.rate.limit.not.only=XX
papi.rate.limit.to.minimize=XX
4 changes: 2 additions & 2 deletions orcid-core/src/main/resources/orcid-core-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -786,14 +786,14 @@

<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames" value="classpath:i18n/about,classpath:i18n/api,classpath:i18n/email_admin_delegate_request,classpath:i18n/email_added_as_delegate,classpath:i18n/email_auto_deprecate,classpath:i18n/email_new_claim_reminder,classpath:i18n/email_common,classpath:i18n/email_deactivate,classpath:i18n/email_digest,classpath:i18n/email_forgotten_id,classpath:i18n/email_institutional_connection,classpath:i18n/email_locked,classpath:i18n/email_notification,classpath:i18n/email_reactivation,classpath:i18n/email_removed,classpath:i18n/email_reset_password,classpath:i18n/email_reset_password_not_found,classpath:i18n/email_subject,classpath:i18n/email_tips,classpath:i18n/email_verify,classpath:i18n/email_welcome,classpath:i18n/javascript,classpath:i18n/messages,classpath:i18n/admin,classpath:i18n/identifiers,classpath:i18n/notranslate,classpath:i18n/2019-07-emailVisibilitySettings,classpath:i18n/ng_orcid,classpath:i18n/ng_orcid_signin,classpath:i18n/email2faDisabled,classpath:i18n/layout,classpath:i18n/notification_share,classpath:i18n/notification_digest,classpath:i18n/notification_delegate,classpath:i18n/notification_announcement,classpath:i18n/notification_admin_delegate,classpath:i18n/email_add_works_to_record" />
<property name="basenames" value="classpath:i18n/about,classpath:i18n/api,classpath:i18n/email_admin_delegate_request,classpath:i18n/email_added_as_delegate,classpath:i18n/email_auto_deprecate,classpath:i18n/email_new_claim_reminder,classpath:i18n/email_common,classpath:i18n/email_deactivate,classpath:i18n/email_digest,classpath:i18n/email_forgotten_id,classpath:i18n/email_institutional_connection,classpath:i18n/email_locked,classpath:i18n/email_notification,classpath:i18n/email_reactivation,classpath:i18n/email_removed,classpath:i18n/email_reset_password,classpath:i18n/email_reset_password_not_found,classpath:i18n/email_subject,classpath:i18n/email_tips,classpath:i18n/email_verify,classpath:i18n/email_welcome,classpath:i18n/javascript,classpath:i18n/messages,classpath:i18n/admin,classpath:i18n/identifiers,classpath:i18n/notranslate,classpath:i18n/2019-07-emailVisibilitySettings,classpath:i18n/ng_orcid,classpath:i18n/ng_orcid_signin,classpath:i18n/email2faDisabled,classpath:i18n/layout,classpath:i18n/notification_share,classpath:i18n/notification_digest,classpath:i18n/notification_delegate,classpath:i18n/notification_announcement,classpath:i18n/notification_admin_delegate,classpath:i18n/email_add_works_to_record,classpath:i18n/papi_rate_limit_email" />
<property name="defaultEncoding" value="UTF-8" />
<property name="cacheSeconds" value="${org.orcid.core.messages.cacheSeconds:5}" />
</bean>

<bean id="messageSourceNoFallback"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames" value="classpath:i18n/about,classpath:i18n/api,classpath:i18n/email_admin_delegate_request,classpath:i18n/email_added_as_delegate,classpath:i18n/email_auto_deprecate,classpath:i18n/email_new_claim_reminder,classpath:i18n/email_common,classpath:i18n/email_deactivate,classpath:i18n/email_digest,classpath:i18n/email_forgotten_id,classpath:i18n/email_institutional_connection,classpath:i18n/email_locked,classpath:i18n/email_notification,classpath:i18n/email_reactivation,classpath:i18n/email_removed,classpath:i18n/email_reset_password,classpath:i18n/email_reset_password_not_found,classpath:i18n/email_subject,classpath:i18n/email_tips,classpath:i18n/email_verify,classpath:i18n/email_welcome,classpath:i18n/javascript,classpath:i18n/messages,classpath:i18n/admin,classpath:i18n/identifiers,classpath:i18n/notranslate,classpath:i18n/2019-07-emailVisibilitySettings,classpath:i18n/ng_orcid,classpath:i18n/ng_orcid_signin,classpath:i18n/email2faDisabled,classpath:i18n/layout,classpath:i18n/notification_share,classpath:i18n/notification_digest,classpath:i18n/notification_delegate,classpath:i18n/notification_announcement,classpath:i18n/notification_admin_delegate,classpath:i18n/email_add_works_to_record" />
<property name="basenames" value="classpath:i18n/about,classpath:i18n/api,classpath:i18n/email_admin_delegate_request,classpath:i18n/email_added_as_delegate,classpath:i18n/email_auto_deprecate,classpath:i18n/email_new_claim_reminder,classpath:i18n/email_common,classpath:i18n/email_deactivate,classpath:i18n/email_digest,classpath:i18n/email_forgotten_id,classpath:i18n/email_institutional_connection,classpath:i18n/email_locked,classpath:i18n/email_notification,classpath:i18n/email_reactivation,classpath:i18n/email_removed,classpath:i18n/email_reset_password,classpath:i18n/email_reset_password_not_found,classpath:i18n/email_subject,classpath:i18n/email_tips,classpath:i18n/email_verify,classpath:i18n/email_welcome,classpath:i18n/javascript,classpath:i18n/messages,classpath:i18n/admin,classpath:i18n/identifiers,classpath:i18n/notranslate,classpath:i18n/2019-07-emailVisibilitySettings,classpath:i18n/ng_orcid,classpath:i18n/ng_orcid_signin,classpath:i18n/email2faDisabled,classpath:i18n/layout,classpath:i18n/notification_share,classpath:i18n/notification_digest,classpath:i18n/notification_delegate,classpath:i18n/notification_announcement,classpath:i18n/notification_admin_delegate,classpath:i18n/email_add_works_to_record,classpath:i18n/papi_rate_limit_email" />
<property name="defaultEncoding" value="UTF-8" />
<property name="cacheSeconds" value="${org.orcid.core.messages.cacheSeconds:5}" />
<property name="fallbackToSystemLocale" value="false" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<#import "email_macros.ftl" as emailMacros />
Dear ${emailName},
<@emailMacros.msg "email.common.dear" /><@emailMacros.space />${emailName},

This is an important message to let you know that you have exceeded your daily Public API usage limit with your integration (https://info.orcid.org/ufaqs/what-are-the-api-limits/):
<@emailMacros.msg "papi.rate.limit.important.msg" /><@emailMacros.space /><@emailMacros.msg "papi.rate.limit.daily.usage.limit" /><@emailMacros.space /><@emailMacros.msg "papi.rate.limit.your.integration" /><@emailMacros.space />(https://info.orcid.org/ufaqs/what-are-the-api-limits/):

Client Name: ${clientName}
Client ID: ${clientId}
<@emailMacros.msg "papi.rate.limit.client.name" /><@emailMacros.space />${clientName}
<@emailMacros.msg "papi.rate.limit.client.id" /><@emailMacros.space />${clientId}

Please remember that the ORCID Public API is free for non-commercial use by individuals as stated in the Public APIs Terms of Service (https://info.orcid.org/public-client-terms-of-service). By "non-commercial" we mean that you may not charge any re-use fees for the Public API, and you may not make use of the Public API in connection with any revenue-generating product or service.
<@emailMacros.msg "papi.rate.limit.please.remember" /><@emailMacros.space /><@emailMacros.msg "papi.rate.limit.public.api.terms" /><@emailMacros.space />(https://info.orcid.org/public-client-terms-of-service).<@emailMacros.space /><@emailMacros.msg "papi.rate.limit.by.non.commercial" />

Based on your API usage, we highly recommend you consider becoming an ORCID member for access to our Member API (https://info.orcid.org/what-is-orcid/services/member-api/). Not only will it allow you to access a higher Rate Limits and an unrestricted Usage Quota, but you will be able to access Trusted Party data in ORCID records and contribute data to ORCID records from your institutional systems.
<@emailMacros.msg "papi.rate.limit.based.on.your" /><@emailMacros.space /><@emailMacros.msg "papi.rate.limit.member.api" /><@emailMacros.space />(https://info.orcid.org/what-is-orcid/services/member-api/).<@emailMacros.space /><@emailMacros.msg "papi.rate.limit.not.only" />

To minimize any disruption to your ORCID integration in the future, we would recommend that you reach out to our Engagement Team by replying to this email to discuss our ORCID membership options.
<@emailMacros.msg "papi.rate.limit.to.minimize" />

<#include "email_footer.ftl"/>
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
<div style="padding: 20px; padding-top: 10px; width: 700px; margin: auto;">
<img src="https://orcid.org/sites/all/themes/orcid/img/orcid-logo.png" alt="ORCID.org"/>
<hr />
<span style="font-family: arial, helvetica, sans-serif; font-size: 15px; color: #494A4C; font-weight: bold;">Dear ${emailName},</span>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;">This is an important message to let you know that you have exceeded your <a href="https://info.orcid.org/ufaqs/what-are-the-api-limits/" target="_blank">daily Public API usage limit</a> with your integration:</p>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;">Client Name: ${clientName}</p>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;">Client ID: ${clientId}</p>
<span style="font-family: arial, helvetica, sans-serif; font-size: 15px; color: #494A4C; font-weight: bold;" ><@emailMacros.msg "email.common.dear" /> ${emailName},</span>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;"><@emailMacros.msg "papi.rate.limit.important.msg" /><@emailMacros.space /><a href="https://info.orcid.org/ufaqs/what-are-the-api-limits/" target="_blank"><@emailMacros.msg "papi.rate.limit.daily.usage.limit" /></a><@emailMacros.space /><@emailMacros.msg "papi.rate.limit.your.integration" /></p>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;"><@emailMacros.msg "papi.rate.limit.client.name" /><@emailMacros.space /> ${clientName}</p>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;"><@emailMacros.msg "papi.rate.limit.client.id" /><@emailMacros.space />${clientId}</p>
<br/>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;">Please remember that the ORCID Public API is free for non-commercial use by individuals as stated in the <a href="https://info.orcid.org/public-client-terms-of-service/" target="_blank">Public APIs Terms of Service</a>. By "non-commercial" we mean that you may not charge any re-use fees for the Public API, and you may not make use of the Public API in connection with any revenue-generating product or service.</p>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;">Based on your API usage, we highly recommend you consider becoming an ORCID member for access to our <a href="https://info.orcid.org/what-is-orcid/services/member-api/" target="_blank">Member API</a>. Not only will it allow you to access a higher Rate Limits and an unrestricted Usage Quota, but you will be able to access Trusted Party data in ORCID records and contribute data to ORCID records from your institutional systems.</p>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;">To minimize any disruption to your ORCID integration in the future, we would recommend that you reach out to our Engagement Team by replying to this email to discuss our ORCID membership options.
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;"><@emailMacros.msg "papi.rate.limit.please.remember" /><@emailMacros.space /><a href="https://info.orcid.org/public-client-terms-of-service/" target="_blank"><@emailMacros.msg "papi.rate.limit.public.api.terms" /></a>.<@emailMacros.space /><@emailMacros.msg "papi.rate.limit.by.non.commercial" /></p>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;"><@emailMacros.msg "papi.rate.limit.based.on.your" /><@emailMacros.space /><a href="https://info.orcid.org/what-is-orcid/services/member-api/" target="_blank"><@emailMacros.msg "papi.rate.limit.member.api" /></a>.<@emailMacros.space /><@emailMacros.msg "papi.rate.limit.not.only" /></p>
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C; white-space: pre;"><@emailMacros.msg "papi.rate.limit.to.minimize" />
<p style="font-family: arial, helvetica, sans-serif;font-size: 15px;color: #494A4C;">
<#include "email_footer_html.ftl"/>
</p>
Expand Down
Loading

0 comments on commit 2ae049e

Please sign in to comment.