Oh, I did forgot the change in logging in, thanks.

I've filed https://jira.duraspace.org/browse/DS-3353 as the issue is
replicable on demo.dspace.org.

Regards,
Ondrej

2016-10-03 21:53 GMT+02:00 Bruno Nocera Zanette <brunonzane...@gmail.com>:

> Ondrej,
> The login method has changed on DSpace 6. Now, email and password must be
> passed as a html queries, and it returns an JCOOKIE that must be passed
> back to the server on every request. Also, the queries must be on HTML safe
> format.
>
> More info at:
> https://wiki.duraspace.org/display/DSDOC6x/REST+API#
> RESTAPI-Index/Authentication
>
> I've wrote an collection of bash scripts to test DSpace REST endpoints,
> that you may take a look to understand it better:
> Login: https://github.com/BrunoNZ/dspace-rest-requests/blob/
> master/login.sh
> SendRequest: https://github.com/BrunoNZ/dspace-rest-requests/blob/
> master/send_request.sh
>
> I haven't tested what you've said yet, but if true, it is a big issue!
>
> Em sex, 30 de set de 2016 às 12:14, Ondřej Košarko <
> kosa...@ufal.mff.cuni.cz> escreveu:
>
>> Hi,
>> I'm having an issue while creating an item as a non admin user through
>> REST API.
>> I've added the user to collection submit, but am still getting ERROR
>> org.dspace.rest.CollectionsResource @ User(fake_em...@example.com) has
>> not permission to write collection!
>> I was going through the code and it seems to me that the permissions
>> asked are wrong, e.g. https://github.com/DSpace/
>> DSpace/blob/master/dspace-rest/src/main/java/org/dspace/
>> rest/CollectionsResource.java#L349 asks for Constants.WRITE on
>> collection when it is adding an item, while according to
>> https://wiki.duraspace.org/display/DSDOC5x/Functional+
>> Overview#FunctionalOverview-Authorization it should be Constants.ADD.
>> This is probably not the only issue as deleting a collection would require
>> DELETE on the owning community object not the collection itself (
>> https://github.com/DSpace/DSpace/blob/master/dspace-
>> rest/src/main/java/org/dspace/rest/CollectionsResource.java#L506)
>>
>> I hope I'm not the only one seeing this and hope that I'm reading the
>> docs right, I was gonna test it on demo.dspace.org. But I couldn't log
>> in. Can you spot any problems with the following cmd (i've ommited the real
>> password)?
>> curl -k -X POST -H "Content-Type: application/json" -d '{"email":"
>> dspacedemo+ad...@gmail.com","password":"d....."}'
>> https://demo.dspace.org/rest/login
>>
>> Regards,
>> Ondrej
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "DSpace Technical Support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to dspace-tech+unsubscr...@googlegroups.com.
>> To post to this group, send email to dspace-tech@googlegroups.com.
>> Visit this group at https://groups.google.com/group/dspace-tech.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Bruno Nocera Zanette
> +55 41 9992-2508
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to