Skip to content

Commit b3c588f

Browse files
committed
Merge branch 'main' into OAuthMigration
2 parents 1a3751c + 4d396f2 commit b3c588f

File tree

4 files changed

+19
-28
lines changed

4 files changed

+19
-28
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## v2.70.15 - 2025-01-31
2+
3+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.70.14...v2.70.15)
4+
5+
## v2.70.14 - 2025-01-30
6+
7+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.70.13...v2.70.14)
8+
19
## v2.70.13 - 2025-01-30
210

311
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.70.12...v2.70.13)

orcid-core/src/main/java/org/orcid/core/manager/v3/impl/EmailManagerImpl.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,11 @@ public void reactivatePrimaryEmail(String orcid, String email) {
266266
entity.setEmail(emailKeys.get(FILTERED_EMAIL));
267267
}
268268
entity.setPrimary(true);
269-
entity.setVerified(true);
270-
emailDao.merge(entity);
269+
entity.setVerified(true);
270+
if (entity.getDateVerified() == null) {
271+
entity.setDateVerified(new Date());
272+
}
273+
emailDao.merge(entity);
271274
emailDao.flush();
272275
}
273276

orcid-core/src/main/java/org/orcid/core/manager/v3/impl/ProfileEntityManagerImpl.java

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,7 @@
1919
import org.orcid.core.manager.EncryptionManager;
2020
import org.orcid.core.manager.ProfileEntityCacheManager;
2121
import org.orcid.core.manager.impl.OrcidUrlManager;
22-
import org.orcid.core.manager.v3.AddressManager;
23-
import org.orcid.core.manager.v3.AffiliationsManager;
24-
import org.orcid.core.manager.v3.BiographyManager;
25-
import org.orcid.core.manager.v3.EmailManager;
26-
import org.orcid.core.manager.v3.ExternalIdentifierManager;
27-
import org.orcid.core.manager.v3.GivenPermissionToManager;
28-
import org.orcid.core.manager.v3.NotificationManager;
29-
import org.orcid.core.manager.v3.OtherNameManager;
30-
import org.orcid.core.manager.v3.PeerReviewManager;
31-
import org.orcid.core.manager.v3.ProfileEntityManager;
32-
import org.orcid.core.manager.v3.ProfileFundingManager;
33-
import org.orcid.core.manager.v3.ProfileHistoryEventManager;
34-
import org.orcid.core.manager.v3.ProfileKeywordManager;
35-
import org.orcid.core.manager.v3.RecordNameManager;
36-
import org.orcid.core.manager.v3.ResearchResourceManager;
37-
import org.orcid.core.manager.v3.ResearcherUrlManager;
38-
import org.orcid.core.manager.v3.WorkManager;
22+
import org.orcid.core.manager.v3.*;
3923
import org.orcid.core.manager.v3.read_only.RecordNameManagerReadOnly;
4024
import org.orcid.core.manager.v3.read_only.impl.ProfileEntityManagerReadOnlyImpl;
4125
import org.orcid.core.oauth.OrcidOauth2TokenDetailService;
@@ -176,6 +160,9 @@ public class ProfileEntityManagerImpl extends ProfileEntityManagerReadOnlyImpl i
176160
@Resource
177161
private ProfileLastModifiedDao profileLastModifiedDao;
178162

163+
@Resource
164+
private ProfileEmailDomainManager profileEmailDomainManager;
165+
179166
@Override
180167
public boolean orcidExists(String orcid) {
181168
return profileDao.orcidExists(orcid);
@@ -492,6 +479,7 @@ public Boolean doInTransaction(TransactionStatus status) {
492479
// Populate primary email
493480
String primaryEmailTrim = primaryEmail.trim();
494481
emailManager.reactivatePrimaryEmail(orcid, primaryEmailTrim);
482+
profileEmailDomainManager.processDomain(orcid, primaryEmailTrim);
495483
if (reactivation == null) {
496484
// Delete any non primary email
497485
emailManager.clearEmailsAfterReactivation(orcid);

orcid-web/src/main/java/org/orcid/frontend/web/controllers/ErrorController.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,7 @@ public ModelAndView error500Page(ModelAndView mav) {
2727

2828
@RequestMapping(value = "/not-found")
2929
public ModelAndView error404Page(ModelAndView mav) {
30-
String orcid = getCurrentUserOrcid();
31-
if (orcid != null) {
32-
return new ModelAndView("redirect:" + calculateRedirectUrl("/my-orcid"));
33-
} else {
34-
mav.setViewName("error-404");
35-
}
36-
37-
mav.addObject("noIndex", true);
38-
return mav;
30+
return new ModelAndView("redirect:" + calculateRedirectUrl("/404"));
3931
}
4032

4133
@RequestMapping(value = "/oauth/error/redirect-uri-mismatch")

0 commit comments

Comments
 (0)