Skip to content

Commit f2bc406

Browse files
authored
Merge branch 'main' into lmendoza/404-redirects
2 parents c439439 + c3ac1e6 commit f2bc406

203 files changed

Lines changed: 4557 additions & 2927 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,183 @@
1+
## v2.73.6 - 2025-03-20
2+
3+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.73.5...v2.73.6)
4+
5+
### Fix
6+
7+
- Add missing test case (#7255)
8+
9+
## v2.73.5 - 2025-03-20
10+
11+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.73.4...v2.73.5)
12+
13+
## v2.73.4 - 2025-03-20
14+
15+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.73.3...v2.73.4)
16+
17+
### Feature
18+
19+
- Add new endpoint `update deprecation` (#7243)
20+
21+
## v2.73.3 - 2025-03-19
22+
23+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.73.2...v2.73.3)
24+
25+
## v2.73.2 - 2025-03-19
26+
27+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.73.1...v2.73.2)
28+
29+
## v2.73.1 - 2025-03-19
30+
31+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.73.0...v2.73.1)
32+
33+
## v2.73.0 - 2025-03-19
34+
35+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.20...v2.73.0)
36+
37+
## v2.72.20 - 2025-03-17
38+
39+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.19...v2.72.20)
40+
41+
## v2.72.19 - 2025-03-12
42+
43+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.18...v2.72.19)
44+
45+
## v2.72.18 - 2025-03-11
46+
47+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.17...v2.72.18)
48+
49+
## v2.72.17 - 2025-03-11
50+
51+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.16...v2.72.17)
52+
53+
## v2.72.16 - 2025-03-11
54+
55+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.15...v2.72.16)
56+
57+
## v2.72.15 - 2025-03-10
58+
59+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.14...v2.72.15)
60+
61+
## v2.72.14 - 2025-03-10
62+
63+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.13...v2.72.14)
64+
65+
## v2.72.13 - 2025-03-06
66+
67+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.12...v2.72.13)
68+
69+
## v2.72.12 - 2025-03-06
70+
71+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.11...v2.72.12)
72+
73+
## v2.72.11 - 2025-03-06
74+
75+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.10...v2.72.11)
76+
77+
## v2.72.10 - 2025-03-06
78+
79+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.9...v2.72.10)
80+
81+
## v2.72.9 - 2025-03-05
82+
83+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.8...v2.72.9)
84+
85+
## v2.72.8 - 2025-03-05
86+
87+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.7...v2.72.8)
88+
89+
## v2.72.7 - 2025-03-04
90+
91+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.6...v2.72.7)
92+
93+
## v2.72.6 - 2025-03-04
94+
95+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.5...v2.72.6)
96+
97+
## v2.72.5 - 2025-03-03
98+
99+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.4...v2.72.5)
100+
101+
## v2.72.4 - 2025-03-03
102+
103+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.3...v2.72.4)
104+
105+
- [#7235](https://github.com/ORCID/ORCID-Source/pull/7235): Fix switch user role
106+
107+
## v2.72.3 - 2025-03-03
108+
109+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.2...v2.72.3)
110+
111+
- [#7234](https://github.com/ORCID/ORCID-Source/pull/7234): Do not save the session on email verification events
112+
113+
## v2.72.2 - 2025-03-03
114+
115+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.1...v2.72.2)
116+
117+
## v2.72.1 - 2025-02-25
118+
119+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.72.0...v2.72.1)
120+
121+
## v2.72.0 - 2025-02-25
122+
123+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.22...v2.72.0)
124+
125+
## v2.71.23 - 2025-02-24
126+
127+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.22...v2.71.23)
128+
129+
## v2.71.22 - 2025-02-20
130+
131+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.21...v2.71.22)
132+
133+
## v2.71.21 - 2025-02-19
134+
135+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.20...v2.71.21)
136+
137+
## v2.71.20 - 2025-02-15
138+
139+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.19...v2.71.20)
140+
141+
## v2.71.19 - 2025-02-14
142+
143+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.18...v2.71.19)
144+
145+
- [#7222](https://github.com/ORCID/ORCID-Source/pull/7222): Changed Accept type from wild card to octet stream, logging error
146+
147+
## v2.71.18 - 2025-02-14
148+
149+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.17...v2.71.18)
150+
151+
## v2.71.17 - 2025-02-14
152+
153+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.16...v2.71.17)
154+
155+
## v2.71.16 - 2025-02-14
156+
157+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.15...v2.71.16)
158+
159+
## v2.71.15 - 2025-02-13
160+
161+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.14...v2.71.15)
162+
163+
## v2.71.14 - 2025-02-13
164+
165+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.13...v2.71.14)
166+
167+
## v2.71.13 - 2025-02-13
168+
169+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.12...v2.71.13)
170+
171+
## v2.71.12 - 2025-02-13
172+
173+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.11...v2.71.12)
174+
175+
## v2.71.11 - 2025-02-12
176+
177+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.10...v2.71.11)
178+
179+
- [#7216](https://github.com/ORCID/ORCID-Source/pull/7216): pull tx
180+
1181
## v2.71.10 - 2025-02-11
2182

3183
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.71.9...v2.71.10)

orcid-api-common/src/main/java/org/orcid/api/common/jaxb/OrcidExceptionMapper.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,14 @@ public class OrcidExceptionMapper implements ExceptionMapper<Throwable> {
8888
public Response toResponse(Throwable t) {
8989
// Whatever exception has been caught, make sure we log it.
9090
String clientId = securityManager.getClientIdFromAPIRequest();
91-
if(t instanceof OrcidDeprecatedException
91+
if(t instanceof OrcidInvalidScopeException) {
92+
// This exception happens on client_credentials grant, so, the security manager doesn't have the client id info
93+
OrcidInvalidScopeException ex = (OrcidInvalidScopeException) t;
94+
if(clientId == null) {
95+
clientId = ex.getClientId();
96+
}
97+
logShortError(t, clientId);
98+
} else if(t instanceof OrcidDeprecatedException
9299
|| t instanceof LockedException
93100
|| t instanceof DeactivatedException
94101
|| t instanceof OrcidNoBioException

orcid-api-common/src/main/java/org/orcid/api/common/oauth/OrcidClientCredentialEndPointDelegatorImpl.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public Response obtainOauth2Token(String authorization, MultivaluedMap<String, S
131131
if(scopeType.isInternalScope()) {
132132
// You should not allow any internal scope here! go away!
133133
String message = localeManager.resolveMessage("apiError.9015.developerMessage", new Object[]{});
134-
throw new OrcidInvalidScopeException(message);
134+
throw new OrcidInvalidScopeException(message, clientId, scope);
135135
} else if(OrcidOauth2Constants.GRANT_TYPE_CLIENT_CREDENTIALS.equals(grantType)) {
136136
if(!scopeType.isClientCreditalScope())
137137
toRemove.add(scope);
@@ -147,7 +147,10 @@ public Response obtainOauth2Token(String authorization, MultivaluedMap<String, S
147147
}
148148
} catch (IllegalArgumentException iae) {
149149
String message = localeManager.resolveMessage("apiError.9015.developerMessage", new Object[]{});
150-
throw new OrcidInvalidScopeException(message);
150+
if(scopes != null) {
151+
message += " Provided scopes: " + String.join(",", scopes);
152+
}
153+
throw new OrcidInvalidScopeException(message, clientId, iae.getMessage());
151154
}
152155

153156
try{

orcid-api-web/src/main/java/org/orcid/api/memberV2/server/delegator/impl/MemberV2ApiServiceDelegatorImpl.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ public Response viewRecord(String orcid) {
251251
Record record = recordManagerReadOnly.getRecord(orcid);
252252
orcidSecurityManager.checkAndFilter(orcid, record);
253253
if (record.getPerson() != null) {
254-
emailDomainManager.processProfessionalEmailsForV2API(record.getPerson().getEmails());
255254
sourceUtils.setSourceName(record.getPerson());
256255
}
257256
if (record.getActivitiesSummary() != null) {
@@ -798,7 +797,6 @@ public Response viewEmails(String orcid) {
798797
orcidSecurityManager.checkAndFilter(orcid, emails.getEmails(), ScopePathType.ORCID_BIO_READ_LIMITED);
799798
}
800799

801-
emailDomainManager.processProfessionalEmailsForV2API(emails);
802800
ElementUtils.setPathToEmail(emails, orcid);
803801
Api2_0_LastModifiedDatesHelper.calculateLastModified(emails);
804802
sourceUtils.setSourceName(emails);
@@ -1066,7 +1064,6 @@ public Response viewPersonalDetails(String orcid) {
10661064
public Response viewPerson(String orcid) {
10671065
Person person = personDetailsManagerReadOnly.getPersonDetails(orcid);
10681066
orcidSecurityManager.checkAndFilter(orcid, person);
1069-
emailDomainManager.processProfessionalEmailsForV2API(person.getEmails());
10701067
ElementUtils.setPathToPerson(person, orcid);
10711068
Api2_0_LastModifiedDatesHelper.calculateLastModified(person);
10721069
sourceUtils.setSourceName(person);

orcid-api-web/src/main/java/org/orcid/api/memberV3/server/delegator/impl/MemberV3ApiServiceDelegatorImpl.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ public Response viewRecord(String orcid) {
307307
Record record = recordManagerReadOnly.getRecord(orcid, filterVersionOfIdentifiers);
308308
orcidSecurityManager.checkAndFilter(orcid, record);
309309
if (record.getPerson() != null) {
310-
emailDomainManager.processProfessionalEmailsForV3API(record.getPerson().getEmails());
311310
sourceUtils.setSourceName(record.getPerson());
312311
}
313312
if (record.getActivitiesSummary() != null) {
@@ -886,8 +885,6 @@ public Response viewEmails(String orcid) {
886885
orcidSecurityManager.checkAndFilter(orcid, emails.getEmails(), ScopePathType.ORCID_BIO_READ_LIMITED);
887886
}
888887

889-
emailDomainManager.processProfessionalEmailsForV3API(emails);
890-
891888
ElementUtils.setPathToEmail(emails, orcid);
892889
Api3_0LastModifiedDatesHelper.calculateLastModified(emails);
893890
sourceUtils.setSourceName(emails);
@@ -1166,7 +1163,6 @@ public Response viewPerson(String orcid) {
11661163
checkProfileStatus(orcid, true);
11671164
Person person = personDetailsManagerReadOnly.getPersonDetails(orcid, false);
11681165
orcidSecurityManager.checkAndFilter(orcid, person);
1169-
emailDomainManager.processProfessionalEmailsForV3API(person.getEmails());
11701166
ElementUtils.setPathToPerson(person, orcid);
11711167
Api3_0LastModifiedDatesHelper.calculateLastModified(person);
11721168
sourceUtils.setSourceName(person);

orcid-api-web/src/test/java/org/orcid/api/memberV2/server/delegator/MemberV2ApiServiceDelegator_EmailsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ private void checkEmails(Emails emails) {
206206
if(e.getEmail().equals("[email protected]")) {
207207
assertTrue(e.isVerified());
208208
// The source and name on verified professional email addresses should change
209-
assertEquals("0000-0000-0000-0000", e.getSource().retrieveSourcePath());
210-
assertEquals("ORCID email validation", e.getSource().getSourceName().getContent());
209+
assertEquals("APP-5555555555555555", e.getSource().retrieveSourcePath());
210+
assertEquals("Source Client 1", e.getSource().getSourceName().getContent());
211211
} else if(e.getEmail().equals("[email protected]")) {
212212
assertTrue(e.isVerified());
213213
// The source and name on non professional email addresses should not change

orcid-api-web/src/test/java/org/orcid/api/memberV2/server/delegator/MemberV2ApiServiceDelegator_ReadPersonTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,8 @@ private void checkEmails(Emails emails) {
648648
if(e.getEmail().equals("[email protected]")) {
649649
assertTrue(e.isVerified());
650650
// The source and name on verified professional email addresses should change
651-
assertEquals("0000-0000-0000-0000", e.getSource().retrieveSourcePath());
652-
assertEquals("ORCID email validation", e.getSource().getSourceName().getContent());
651+
assertEquals("APP-5555555555555555", e.getSource().retrieveSourcePath());
652+
assertEquals("Source Client 1", e.getSource().getSourceName().getContent());
653653
} else if(e.getEmail().equals("[email protected]")) {
654654
assertTrue(e.isVerified());
655655
// The source and name on non professional email addresses should not change

orcid-api-web/src/test/java/org/orcid/api/memberV2/server/delegator/MemberV2ApiServiceDelegator_ReadRecordTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -269,25 +269,25 @@ public void testViewRecord() {
269269
for (Email email : person.getEmails().getEmails()) {
270270
Utils.verifyLastModified(email.getLastModifiedDate());
271271
if (email.getEmail().equals("[email protected]")) {
272-
assertEquals("0000-0000-0000-0000", email.getSource().retrieveSourcePath());
272+
assertEquals("APP-5555555555555555", email.getSource().retrieveSourcePath());
273273
assertEquals(org.orcid.jaxb.model.common_v2.Visibility.PUBLIC.value(), email.getVisibility().value());
274-
assertEquals("ORCID email validation", email.getSource().getSourceName().getContent());
274+
assertEquals("Source Client 1", email.getSource().getSourceName().getContent());
275275
} else if (email.getEmail().equals("[email protected]")) {
276-
assertEquals("0000-0000-0000-0000", email.getSource().retrieveSourcePath());
276+
assertEquals("APP-5555555555555555", email.getSource().retrieveSourcePath());
277277
assertEquals(org.orcid.jaxb.model.common_v2.Visibility.LIMITED.value(), email.getVisibility().value());
278-
assertEquals("ORCID email validation", email.getSource().getSourceName().getContent());
278+
assertEquals("Source Client 1", email.getSource().getSourceName().getContent());
279279
} else if (email.getEmail().equals("[email protected]")) {
280-
assertEquals("0000-0000-0000-0000", email.getSource().retrieveSourcePath());
280+
assertEquals("APP-5555555555555555", email.getSource().retrieveSourcePath());
281281
assertEquals(org.orcid.jaxb.model.common_v2.Visibility.PRIVATE.value(), email.getVisibility().value());
282-
assertEquals("ORCID email validation", email.getSource().getSourceName().getContent());
282+
assertEquals("Source Client 1", email.getSource().getSourceName().getContent());
283283
} else if (email.getEmail().equals("[email protected]")) {
284-
assertEquals("0000-0000-0000-0000", email.getSource().retrieveSourcePath());
284+
assertEquals("0000-0000-0000-0003", email.getSource().retrieveSourcePath());
285285
assertEquals(org.orcid.jaxb.model.common_v2.Visibility.LIMITED.value(), email.getVisibility().value());
286-
assertEquals("ORCID email validation", email.getSource().getSourceName().getContent());
286+
assertEquals("Credit Name", email.getSource().getSourceName().getContent());
287287
} else if (email.getEmail().equals("[email protected]")) {
288-
assertEquals("0000-0000-0000-0000", email.getSource().retrieveSourcePath());
288+
assertEquals("0000-0000-0000-0003", email.getSource().retrieveSourcePath());
289289
assertEquals(org.orcid.jaxb.model.common_v2.Visibility.PUBLIC.value(), email.getVisibility().value());
290-
assertEquals("ORCID email validation", email.getSource().getSourceName().getContent());
290+
assertEquals("Credit Name", email.getSource().getSourceName().getContent());
291291
} else {
292292
fail("Invalid email found: " + email.getEmail());
293293
}
@@ -1173,8 +1173,8 @@ private void checkEmails(Emails emails) {
11731173
if(e.getEmail().equals("[email protected]")) {
11741174
assertTrue(e.isVerified());
11751175
// The source and name on verified professional email addresses should change
1176-
assertEquals("0000-0000-0000-0000", e.getSource().retrieveSourcePath());
1177-
assertEquals("ORCID email validation", e.getSource().getSourceName().getContent());
1176+
assertEquals("APP-5555555555555555", e.getSource().retrieveSourcePath());
1177+
assertEquals("Source Client 1", e.getSource().getSourceName().getContent());
11781178
} else if(e.getEmail().equals("[email protected]")) {
11791179
assertTrue(e.isVerified());
11801180
// The source and name on non professional email addresses should not change

orcid-api-web/src/test/java/org/orcid/api/memberV3/server/delegator/MemberV3ApiServiceDelegator_EmailsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ private void checkEmails(Emails emails) {
209209
if(e.getEmail().equals("[email protected]")) {
210210
assertTrue(e.isVerified());
211211
// The source and name on non verified professional email addresses should not change
212-
assertEquals("0000-0000-0000-0000", e.getSource().retrieveSourcePath());
213-
assertEquals("ORCID email validation", e.getSource().getSourceName().getContent());
212+
assertEquals("APP-5555555555555555", e.getSource().retrieveSourcePath());
213+
assertEquals("Source Client 1", e.getSource().getSourceName().getContent());
214214
} else if(e.getEmail().equals("[email protected]")) {
215215
assertTrue(e.isVerified());
216216
// The source and name on non professional email addresses should not change

orcid-api-web/src/test/java/org/orcid/api/memberV3/server/delegator/MemberV3ApiServiceDelegator_ReadPersonTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,8 @@ private void checkEmails(Emails emails) {
655655
if(e.getEmail().equals("[email protected]")) {
656656
assertTrue(e.isVerified());
657657
// The source and name on non verified professional email addresses should not change
658-
assertEquals("0000-0000-0000-0000", e.getSource().retrieveSourcePath());
659-
assertEquals("ORCID email validation", e.getSource().getSourceName().getContent());
658+
assertEquals("APP-5555555555555555", e.getSource().retrieveSourcePath());
659+
assertEquals("Source Client 1", e.getSource().getSourceName().getContent());
660660
} else if(e.getEmail().equals("[email protected]")) {
661661
assertTrue(e.isVerified());
662662
// The source and name on non professional email addresses should not change

0 commit comments

Comments
 (0)