Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DS-4096: updating owning collections #2283

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@KevinVdV
Copy link
Member

commented Dec 6, 2018

In this PR we have created support for moving an item between collections.
A new rest controller (ItemOwningCollectionUpdateRestController) was added to support the behavior which works using PUT.

Jira link: https://jira.duraspace.org/browse/DS-4096
RestContract PR link: DSpace/Rest7Contract#34

Yana De Pauw and others added some commits Sep 26, 2018

@KevinVdV KevinVdV added the REST API v7 label Dec 6, 2018

@KevinVdV KevinVdV added this to the 7.0 milestone Dec 6, 2018

@tdonohue tdonohue changed the title Ds 4096 updating owning collections2 DS-4096: updating owning collections Dec 6, 2018

@YanaDePauw YanaDePauw referenced this pull request Dec 19, 2018

Open

Move item component #335

@tdonohue
Copy link
Member

left a comment

@KevinVdV : I reviewed this today. The overall code looks reasonable, but the URI implementation here doesn't match what was decided upon in the REST Contract. So, this code (and the Integration Test) should be updated to align with the REST Contract, see DSpace/Rest7Contract#34

@PreAuthorize("hasPermission(#itemUuid, 'ITEM','WRITE') && hasPermission(#targetUuid,'COLLECTION','ADD')")
@PostAuthorize("returnObject != null")
public CollectionRest move(@PathVariable UUID itemUuid, HttpServletResponse response,
HttpServletRequest request, @RequestParam(name = "collection") UUID targetUuid)

This comment has been minimized.

Copy link
@tdonohue

tdonohue Feb 8, 2019

Member

This doesn't look to align with the REST Contract (see DSpace/Rest7Contract#34). The REST Contract stats that the PUT request should pass in the Collection's UUID in the body of the request (as a text/uri-list). This method looks to be expecting the Collection UUID as a request parameter (?collection=[:uuid])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.