DSpace / RestContract

REST Contract for DSpace 7-8
https://wiki.lyrasis.org/display/DSDOC8x/
39 stars 50 forks source link

Complete the version and version history endpoints #171

Closed abollini closed 3 years ago

abollini commented 3 years ago

This rest contract add the capabilities to create, delete and edit versions (only the summary information).

It is aimed to introduce the needed REST API to support the implementation of all the versioning features available before DSpace 7 and required in https://github.com/DSpace/RestContract/pull/167

It is an alternative to the https://github.com/DSpace/RestContract/pull/167 Indeed, from the discussion in the other PR we get the idea to rethink our design keeping almost untouched (backward compatible) the access endpoints that were already defined.

Please note that redesigning the endpoint and having learned some caveau from the first draft implementation that we had started https://github.com/DSpace/DSpace/pull/3371 we noted that it was required to detail better the security for these endpoints.

What is here proposed match with the implementation observed in previous DSpace versions. It is an edge scenario but it is possible that versions have different permissions. For example version 1 can be READ anonymous version 2 can be restricted to administrators version 3 can be READ anonymous again etc.

if the an anonymous user access version 1 or version 3 and versioning is not reserved to the admins he will see the full list of versions but the version table doesn't contain any information about the items itself other than the handle (that can be easily predicted in any case). If the user click on a reserved version the login/forbidden message is prompt. With the proposed contract it will be almost the same except that the handle will be not shown but the access link can be provided under the version number.

Finally, I have left out of this pr any discussion about the interaction between entities and versioning as this can be discussed and clarified in a followup PR, the concept here would stay valid whatever approach we will decide to take

abollini commented 3 years ago

@tdonohue @benbosman I have added a warning message and details about the fact that this feature is not yet complete for entity items and will be disabled by default for them

tdonohue commented 3 years ago

Merging with +2 approval