-
Notifications
You must be signed in to change notification settings - Fork 530
Description
Overview of the Feature Request
Currently, when the ExcludeEmailFromExport
setting is enabled, the getVersion /{id}/versions/{versionId}
API prevents the author email field from being returned. This behavior makes sense for dataset display in view mode, but it causes issues because the dataset editing form also relies on this same endpoint to pre-populate fields, including the author email.
At present, within the SPA we use the {id}/versions/{versionId}
endpoint (with metadata blocks) for two different purposes:
- Displaying datasets in view mode.
- Populating the dataset edit form.
For view mode, it is acceptable for author emails to be hidden or displayed based on the configuration. However, for the edit form, we always require access to the author email field when the user has edit permissions.
Requirement
Enhance the API so that when an authorized user (with dataset edit permissions) is editing a dataset, the API always returns the author email, regardless of the ExcludeEmailFromExport setting.
Potential Approaches
Introduce an additional option/flag in the getVersion endpoint to indicate that the request is being made for editing purposes (with appropriate permission checks).
Alternatively, create a separate endpoint dedicated to retrieving dataset version data for editing purposes.
What kind of user is the feature intended for?
API User
What inspired the request?
SPA Release
What existing behavior do you want changed?
ExcludeEmailFromExport setting behavior
Any brand new behavior do you want to add to Dataverse?
Do not exclude author email when dataset metadata is obtained for editing purposes and user has edit permission.
Any open or closed issues related to this feature request?
None
Are you thinking about creating a pull request for this feature?
Yes