Skip to content

Commit 82fb5d6

Browse files
committed
Merge branch '9767-send-new-notifications-to-users-who-meet-specific-criteria-mvp' of https://github.com/ORCID/ORCID-Source into 9767-send-new-notifications-to-users-who-meet-specific-criteria-mvp
2 parents ce6cd62 + 6cb48f1 commit 82fb5d6

58 files changed

Lines changed: 723 additions & 1050 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.

.github/workflows/build_test_release_tag.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,22 @@ jobs:
112112
seed_maven_cache: false
113113
install_maven_dependencies: false
114114

115+
bld_docker:
116+
uses: ./.github/workflows/bld_docker.yml
117+
secrets: inherit # pass all secrets for uploading assets
118+
needs:
119+
- lint
120+
- test_mvn
121+
permissions:
122+
checks: write
123+
contents: read
124+
issues: read
125+
pull-requests: write
126+
with:
127+
version_tag: ${{ inputs.version_tag }}
128+
bump: ${{ inputs.bump }}
129+
ref: ${{ inputs.ref }}
130+
115131
##############################################################################
116132

117133
rel_tag:

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1+
## v2.79.6 - 2025-05-26
2+
3+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.79.5...v2.79.6)
4+
5+
## v2.79.5 - 2025-05-26
6+
7+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.79.4...v2.79.5)
8+
9+
## v2.79.4 - 2025-05-26
10+
11+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.79.3...v2.79.4)
12+
13+
## v2.79.3 - 2025-05-21
14+
15+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.79.2...v2.79.3)
16+
17+
## v2.79.2 - 2025-05-19
18+
19+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.79.1...v2.79.2)
20+
21+
## v2.79.1 - 2025-05-19
22+
23+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.79.0...v2.79.1)
24+
25+
## v2.79.0 - 2025-05-19
26+
27+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.78.12...v2.79.0)
28+
29+
## v2.78.12 - 2025-05-15
30+
31+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.78.11...v2.78.12)
32+
33+
- [#7294](https://github.com/ORCID/ORCID-Source/pull/7294): tx pull
34+
35+
## v2.78.11 - 2025-05-15
36+
37+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.78.10...v2.78.11)
38+
39+
## v2.78.10 - 2025-05-14
40+
41+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.78.9...v2.78.10)
42+
43+
## v2.78.9 - 2025-05-14
44+
45+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.78.8...v2.78.9)
46+
47+
## v2.78.8 - 2025-05-12
48+
49+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.78.7...v2.78.8)
50+
51+
## v2.78.7 - 2025-05-08
52+
53+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.78.6...v2.78.7)
54+
55+
## v2.78.6 - 2025-05-08
56+
57+
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.78.5...v2.78.6)
58+
159
## v2.78.5 - 2025-05-08
260

361
[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.78.4...v2.78.5)

docker-compose.ui.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
services:
2+
haprouter:
3+
image: ${DOCKER_REG_PRIVATE}/orcid/registry/orcid-haprouter:${TAG:-0.0.1}
4+
build:
5+
context: .
6+
dockerfile: orcid-haprouter/Dockerfile
7+
restart: ${RESTART:-no}
8+
env_file:
9+
- orcid-haprouter/default.env
10+
- orcid-haprouter/deployment.env
11+
ports:
12+
- 0.0.0.0:678:1936 # stats
13+
- 0.0.0.0:7983:7983 # solr read
14+
- 0.0.0.0:6983:6983 # solr write
15+
- 0.0.0.0:7432:7432 # postgres read
16+
- 0.0.0.0:6432:6432 # postgres write
17+
networks:
18+
app:
19+
20+
ui_frontend:
21+
image: ${DOCKER_REG_PRIVATE}/orcid/registry/orcid-web-frontend-${FRONTEND_LABEL:-qa}:${FRONTEND_TAG:-0.0.1}
22+
build:
23+
context: .
24+
dockerfile: 'FIXME: must build in the orcid-angular project first Dockerfile.build'
25+
restart: ${RESTART:-no}
26+
ports:
27+
- 0.0.0.0:13106:80
28+
networks:
29+
app:
30+
31+
ui_proxy:
32+
image: ${DOCKER_REG_PRIVATE}/orcid/registry/orcid-web-proxy:${TAG:-0.0.1}
33+
build:
34+
context: .
35+
dockerfile: orcid-web-proxy/Dockerfile
36+
restart: ${RESTART:-no}
37+
ports:
38+
- 0.0.0.0:13107:80
39+
- 0.0.0.0:13108:443
40+
volumes:
41+
- ./certs/dhparam.pem:/etc/nginx/certs/dhparam.pem:ro
42+
- ${SSL_CERTIFICATE:-./certs/docker_dev.pem}:/etc/nginx/certs/docker.pem:ro
43+
- ${SSL_CERTIFICATE_KEY:-./certs/docker_dev-key.pem}:/etc/nginx/certs/docker-key.pem:ro
44+
networks:
45+
app:
46+
47+
ui:
48+
image: ${DOCKER_REG_PRIVATE}/orcid/registry/orcid-web:${TAG:-0.0.1}
49+
build:
50+
cache_from:
51+
- orcid/registry-dependencies:${TAG:-0.0.1}
52+
context: .
53+
dockerfile: orcid-web/Dockerfile
54+
args:
55+
tag_numeric: ${TAG:-0.0.1}
56+
restart: ${RESTART:-no}
57+
env_file:
58+
- default.env
59+
- properties/default.orcid_core.env
60+
- properties/default.misc.env
61+
- properties/default.frontend.env
62+
- properties/default.persistence.env
63+
- orcid-web/default.env
64+
- orcid-web/deployment.env
65+
- ${DOCKER_DEV_ENV_FILE:-empty.env}
66+
ports:
67+
- 0.0.0.0:13100:8080
68+
networks:
69+
app:
70+
volumes:
71+
- /opt/docker/logs/reg-ui:/usr/local/tomcat/logs
72+
73+
networks:
74+
app:
75+
driver: bridge

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ public Response viewActivities(String orcid) {
277277
public Response viewWork(String orcid, Long putCode) {
278278
Work w = workManagerReadOnly.getWork(orcid, putCode);
279279
orcidSecurityManager.checkAndFilter(orcid, w, ScopePathType.ORCID_WORKS_READ_LIMITED);
280-
contributorUtils.filterContributorPrivateData(w);
281280
ActivityUtils.cleanEmptyFields(w);
282281
ActivityUtils.setPathToActivity(w, orcid);
283282
sourceUtils.setSourceName(w);
@@ -1086,7 +1085,6 @@ public Response viewBulkWorks(String orcid, String putCodes) {
10861085

10871086
WorkBulk workBulk = workManagerReadOnly.findWorkBulk(orcid, putCodes);
10881087
orcidSecurityManager.checkAndFilter(orcid, workBulk, ScopePathType.ORCID_WORKS_READ_LIMITED);
1089-
contributorUtils.filterContributorPrivateData(workBulk);
10901088
ActivityUtils.cleanEmptyFields(workBulk);
10911089
ActivityUtils.setPathToBulk(workBulk, orcid);
10921090
sourceUtils.setSourceName(workBulk);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ public Response viewWork(String orcid, Long putCode) {
335335
checkProfileStatus(orcid, true);
336336
Work w = workManagerReadOnly.getWork(orcid, putCode);
337337
orcidSecurityManager.checkAndFilter(orcid, w, ScopePathType.ORCID_WORKS_READ_LIMITED);
338-
contributorUtils.filterContributorPrivateData(w);
339338
ActivityUtils.cleanEmptyFields(w);
340339
ActivityUtils.setPathToActivity(w, orcid);
341340
sourceUtils.setSourceName(w);
@@ -1200,7 +1199,6 @@ public Response viewBulkWorks(String orcid, String putCodes) {
12001199

12011200
WorkBulk workBulk = workManagerReadOnly.findWorkBulk(orcid, putCodes);
12021201
orcidSecurityManager.checkAndFilter(orcid, workBulk, ScopePathType.ORCID_WORKS_READ_LIMITED);
1203-
contributorUtils.filterContributorPrivateData(workBulk);
12041202
ActivityUtils.cleanEmptyFields(workBulk);
12051203
ActivityUtils.setPathToBulk(workBulk, orcid);
12061204
sourceUtils.setSourceName(workBulk);

orcid-core/src/main/java/org/orcid/core/common/util/AuthenticationUtils.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import org.apache.commons.lang3.StringUtils;
44
import org.orcid.core.security.OrcidRoles;
5+
import org.slf4j.Logger;
6+
import org.slf4j.LoggerFactory;
57
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
68
import org.springframework.security.core.Authentication;
79
import org.springframework.security.core.GrantedAuthority;
@@ -18,6 +20,8 @@
1820

1921
public class AuthenticationUtils {
2022

23+
private static final Logger LOGGER = LoggerFactory.getLogger(AuthenticationUtils.class);
24+
2125
public static final GrantedAuthority adminAuthority = new SimpleGrantedAuthority(OrcidRoles.ROLE_ADMIN.name());
2226

2327
public static String retrieveEffectiveOrcid() {
@@ -85,8 +89,17 @@ public static boolean isDelegatedByAnAdmin() {
8589
if (authority instanceof SwitchUserGrantedAuthority) {
8690
SwitchUserGrantedAuthority suga = (SwitchUserGrantedAuthority) authority;
8791
Authentication sourceAuthentication = suga.getSource();
88-
if (sourceAuthentication instanceof UsernamePasswordAuthenticationToken && sourceAuthentication.getDetails() instanceof UserDetails) {
89-
return ((UserDetails) sourceAuthentication.getDetails()).getAuthorities().contains(adminAuthority);
92+
93+
LOGGER.trace("isDelegatedByAnAdmin");
94+
LOGGER.trace("Authentication: {}", sourceAuthentication);
95+
LOGGER.trace("Authentication type: {}", sourceAuthentication.getClass().getName());
96+
LOGGER.trace("User Details type: {}", sourceAuthentication.getDetails().getClass());
97+
LOGGER.trace("Source authorities: {}", sourceAuthentication.getAuthorities());
98+
99+
if (sourceAuthentication instanceof UsernamePasswordAuthenticationToken) {
100+
if(sourceAuthentication.getAuthorities() != null) {
101+
return sourceAuthentication.getAuthorities().contains(adminAuthority);
102+
}
90103
}
91104
}
92105
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,8 @@ public List<WorkSummaryExtended> getWorksSummaryExtendedList(String orcid) {
199199
// Filter the contributors list
200200
for (WorkSummaryExtended wse : wseList) {
201201
if (wse.getContributorsGroupedByOrcid() != null && wse.getContributorsGroupedByOrcid().size() > 0) {
202-
contributorUtils.filterContributorsGroupedByOrcidPrivateData(wse.getContributorsGroupedByOrcid(), maxContributorsForUI);
203202
wse.setNumberOfContributors(wse.getContributorsGroupedByOrcid().size());
204203
} else {
205-
contributorUtils.filterContributorPrivateData(wse.getContributors().getContributor(), maxContributorsForUI);
206204
List<ContributorsRolesAndSequences> contributorsGroupedByOrcid = contributorUtils.getContributorsGroupedByOrcid(wse.getContributors().getContributor(), maxContributorsForUI);
207205
wse.setContributorsGroupedByOrcid(contributorsGroupedByOrcid);
208206
wse.setNumberOfContributors(contributorsGroupedByOrcid.size());

orcid-core/src/main/java/org/orcid/core/security/OrcidUserDetailsServiceImpl.java

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,34 @@ private List<GrantedAuthority> rolesAsList(OrcidRoles... roles) {
200200

201201
@Override
202202
public boolean isAdmin() {
203+
LOGGER.trace("Checking if the user is an admin");
203204
SecurityContext context = SecurityContextHolder.getContext();
205+
LOGGER.trace("Is security context null? " + (context == null));
204206
Authentication authentication = null;
205207
if (context != null && context.getAuthentication() != null) {
206208
authentication = context.getAuthentication();
207-
}
209+
//TODO: Remove this code before going live
210+
if(LOGGER.isTraceEnabled()) {
211+
LOGGER.trace("Authentication name " + authentication.getName());
212+
LOGGER.trace("Authorities:");
213+
for (GrantedAuthority auth : authentication.getAuthorities()) {
214+
LOGGER.trace("Authority: " + auth.getAuthority() + " of type: " + auth.getClass().getName());
215+
}
216+
}
217+
///////////////////////////////////////////
208218

209-
if (authentication != null) {
210-
Object details = authentication.getDetails();
211-
if (details instanceof UserDetails) {
212-
UserDetails userDetails = (UserDetails) details;
213-
return userDetails.getAuthorities().contains(adminAuthority);
219+
if(authentication.getAuthorities().contains(adminAuthority)) {
220+
//TODO: Remove this code before going live
221+
LOGGER.trace("Current user " + authentication.getName() + " is an admin");
222+
return true;
223+
} else {
224+
//TODO: Remove this code before going live
225+
LOGGER.trace("Current user " + authentication.getName() + " is not an admin");
214226
}
227+
} else {
228+
LOGGER.trace("Authentication object is null");
215229
}
230+
216231
return false;
217232
}
218233

orcid-core/src/main/java/org/orcid/core/togglz/Features.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
public enum Features implements Feature {
99

10+
@Label("OAuth - affiliation interstitial")
11+
OAUTH_AFFILIATION_INTERSTITIAL,
12+
1013
@Label("Login - affiliation interstitial")
1114
LOGIN_AFFILIATION_INTERSTITIAL,
1215

0 commit comments

Comments
 (0)