Skip to content

Commit

Permalink
Check for orcidaware entity
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro committed Dec 19, 2023
1 parent 2a25678 commit 332571a
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,16 @@ public static Source extractSourceFromEntity(SourceAwareEntity<?> e, ClientDetai
// client
if (!StringUtils.isEmpty(e.getClientSourceId())) {
source.setSourceClientId(new SourceClientId(e.getClientSourceId()));
ClientDetailsEntity clientSource = clientDetailsEntityCacheManager.retrieve(e.getClientSourceId());
if (clientSource.isUserOBOEnabled()) {
String orcidId = null;
if (e instanceof OrcidAware) {
orcidId = ((OrcidAware) e).getOrcid();
}
source.setAssertionOriginOrcid(new SourceOrcid(orcidId));
}
if(e instanceof OrcidAware) {
ClientDetailsEntity clientSource = clientDetailsEntityCacheManager.retrieve(e.getClientSourceId());
if (clientSource.isUserOBOEnabled()) {
String orcidId = null;
if (e instanceof OrcidAware) {
orcidId = ((OrcidAware) e).getOrcid();
}
source.setAssertionOriginOrcid(new SourceOrcid(orcidId));
}
}
}

// member obo
Expand Down

0 comments on commit 332571a

Please sign in to comment.