mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 05:23:14 +00:00
[CST-5669] Minor changes
This commit is contained in:
@@ -230,9 +230,6 @@ public class OrcidSynchronizationServiceImpl implements OrcidSynchronizationServ
|
||||
.filter(metadata -> metadataField.equals(metadata.getMetadataField().toString('.')));
|
||||
}
|
||||
|
||||
private String getProfileType() {
|
||||
return configurationService.getProperty("researcher-profile.type", "Person");
|
||||
}
|
||||
|
||||
private void updateItem(Context context, Item item) throws SQLException {
|
||||
try {
|
||||
|
@@ -48,10 +48,6 @@ public class ResearcherProfile {
|
||||
return UUIDUtils.fromString(dspaceObjectOwner.getAuthority());
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return dspaceObjectOwner.getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* A profile is considered visible if accessible by anonymous users. This method
|
||||
* returns true if the given item has a READ policy related to ANONYMOUS group,
|
||||
|
@@ -206,12 +206,16 @@ public class OrcidAuthenticationBean implements AuthenticationMethod {
|
||||
try {
|
||||
context.turnOffAuthorisationSystem();
|
||||
|
||||
String email = getEmail(person)
|
||||
.orElseThrow(() -> new IllegalStateException("The email is configured private on orcid"));
|
||||
|
||||
String orcid = token.getOrcid();
|
||||
|
||||
EPerson eperson = ePersonService.create(context);
|
||||
|
||||
eperson.setNetid(orcid);
|
||||
eperson.setEmail(getEmail(person).orElse(orcid));
|
||||
|
||||
eperson.setEmail(email);
|
||||
eperson.setFirstName(context, getFirstName(person));
|
||||
eperson.setLastName(context, getLastName(person));
|
||||
eperson.setCanLogIn(true);
|
||||
|
@@ -576,10 +576,10 @@ public class EPersonServiceImpl extends DSpaceObjectServiceImpl<EPerson> impleme
|
||||
|
||||
@Override
|
||||
public EPerson findByProfileItem(Context context, Item profile) throws SQLException {
|
||||
List<MetadataValue> crisOwners = itemService.getMetadata(profile, "dspace", "object", "owner", ANY);
|
||||
if (CollectionUtils.isEmpty(crisOwners)) {
|
||||
List<MetadataValue> owners = itemService.getMetadata(profile, "dspace", "object", "owner", ANY);
|
||||
if (CollectionUtils.isEmpty(owners)) {
|
||||
return null;
|
||||
}
|
||||
return find(context, UUIDUtils.fromString(crisOwners.get(0).getAuthority()));
|
||||
return find(context, UUIDUtils.fromString(owners.get(0).getAuthority()));
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ import org.springframework.stereotype.Component;
|
||||
* Implementation for ResearcherProfile ORCID disconnection.
|
||||
*
|
||||
* Example: <code><br/>
|
||||
* curl -X PATCH http://${dspace.server.url}/api/cris/profiles/<:id-eperson> -H "
|
||||
* curl -X PATCH http://${dspace.server.url}/api/eperson/profiles/<:id-eperson> -H "
|
||||
* Content-Type: application/json" -d '[{ "op": "remove", "path": "/orcid" }]'
|
||||
* </code>
|
||||
*/
|
||||
|
@@ -36,7 +36,7 @@ import org.springframework.stereotype.Component;
|
||||
* patches.
|
||||
*
|
||||
* Example:
|
||||
* <code> curl -X PATCH http://${dspace.server.url}/api/cris/profiles/<:id-eperson> -H "
|
||||
* <code> curl -X PATCH http://${dspace.server.url}/api/eperson/profiles/<:id-eperson> -H "
|
||||
* Content-Type: application/json" -d '[{
|
||||
* "op": "replace",
|
||||
* "path": "/orcid/publications",
|
||||
|
@@ -26,7 +26,7 @@
|
||||
# Configuration file: authentication-x509.cfg
|
||||
|
||||
# ORCID certificate authentication.
|
||||
# plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.OrcidAuthenticationDelegator
|
||||
# plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.OrcidAuthentication
|
||||
|
||||
# * OIDC Authentication
|
||||
# Plugin class: org.dspace.authenticate.OidcAuthentication
|
||||
|
Reference in New Issue
Block a user