4

When I try and delete a rating with the following (token shortened for brevity):

curl -X DELETE -H "Authorization OAuth client_idxxxx" http://ugc/odata.svc/Ratings(Id=634)

I get the following error:

<message xml:lang="en-US">The appropriate delete claim has not been set.</message>

My logs show:

2014-03-26 17:52:58,965 DEBUG ClaimStore - put: uri=taf:request:uri, value=/odata.svc/Ratings(Id=634)
2014-03-26 17:52:58,965 DEBUG JPARatingDAO - Searching for rating with id 634 in storage.
2014-03-26 17:52:58,965 DEBUG ClaimStore - put: uri=taf:claim:contentdelivery:webservice:post:allowed, value=false
2014-03-26 17:52:58,965 DEBUG ODataService - ODATA.NET: Removing entity with path: Ratings(Id=634)
2014-03-26 17:56:29,395 DEBUG WebContext - setCurrentClaimStore: com.tridion.ambientdata.dotnet.DotNetClaimStore@76e86c03, thread: Thread-15
2014-03-26 17:56:29,395 DEBUG WebContext - setCurrentClaimStore: null, thread: Thread-15
2014-03-26 17:56:29,395 DEBUG WebContext - setCurrentClaimStore: null, thread: Thread-32

Is there something specific I need to do to set this "delete" claim?

UPDATE

Whilst I have my answer - we're trying to avoid the default behaviour of the same user being able to post multiple ratings for the same item, so where actually checking if this user had rated already then delete any existing rating.

Is it possible for the visitor service to delete a rating?

  • 2
    OK - I think my issue is I'm trying to call DELETE using my service thats been set-up for visitors with the PostAllowedByOwnerClaimProcessor. As I've autheticated with detail not the same as the author of the post - I cant delete it. If I use the moderator service, I can. – Neil Mar 26 '14 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.