4Science / DSpace

This repository contains the 4Science optimized DSpace & DSpace-CRIS distribution.
https://wiki.lyrasis.org/display/DSPACECRIS/
BSD 3-Clause "New" or "Revised" License
42 stars 61 forks source link

orcid profiles exclude non-public metadata #395

Closed floriangantner closed 10 months ago

floriangantner commented 11 months ago

…adata security level/visibility before calculating the metadata signature for orcid profile objects

References

Description

Short summary of changes (1-2 sentences). configurable option to exclude non-public metadata based on their metadata security level/visibility before calculating the metadata signature for orcid profile objects.

Instructions for Reviewers

Please add a more detailed description of the changes made by your PR. At a minimum, providing a bulleted list of changes in your PR is helpful to reviewers.

List of changes in this PR:

Include guidance for how to test or review your PR. This may include: steps to reproduce a bug, screenshots or description of a new feature, or reasons behind specific changes.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

atarix83 commented 10 months ago

Thanks @floriangantner for this PR

We have reviewed it and we have decided to slightly change the solution proposed. By default the metadata are not sent if security is not null or different than zero. We have removed the property allowedMetadataVisibility and added a further property maxAllowedMetadataVisibility in the AbstractOrcidProfileSectionFactory in order to be able to send anyway metadata with stricter security less or equal the security defined there. e.g. the following configuration will send metadata with security null, 0 or 1, but not if it has security 2

<bean class="org.dspace.orcid.model.factory.impl.OrcidAffiliationFactory">
  <constructor-arg name="sectionType" value="AFFILIATION" />
  <constructor-arg name="preference" value="AFFILIATION" />
  <property name="organizationField" value="${orcid.mapping.affiliation.name}" />
  <property name="roleField" value="${orcid.mapping.affiliation.role}" />
  <property name="startDateField" value="${orcid.mapping.affiliation.start-date}" />
  <property name="endDateField" value="${orcid.mapping.affiliation.end-date}" />
  <property name="maxAllowedMetadataVisibility" value="1" />
</bean>