couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mickael.bai...@free.fr
Subject Re: How to delete a user
Date Tue, 13 Jul 2010 08:24:47 GMT
Hello,

the GET part :

$ curl --proxy "" -X GET http://adm:sometest@localhost:5984/_users/org.couchdb.user:joe
{"_id":"org.couchdb.user:joe","_rev":"1-3aa8c71e227226e1363a759839a572d8","salt":"ab20f6a8e2cf91be6ce319d86be07a2a0207d7a1","password_sha":"d2fe4ed55fa1ef70b62b737d88890b38e5818106","name":"joe","type":"user","roles":[]}

the DELETE part :

curl --proxy "" -X DELETE "http://adm:sometest@localhost:5984/_users/org.couchdb.user:joe?rev=1-3aa8c71e227226e1363a759839a572d8"
{"error":"forbidden","reason":"doc.type must be user"}

However, like J Chris suggest it, if I use a PUT request, adding the {"_deleted": true} property,
it works.

Sad but true.

Mickael

----- Mail Original -----
De: "Benoit Chesneau" <bchesneau@gmail.com>
À: user@couchdb.apache.org
Envoyé: Mardi 13 Juillet 2010 09h06:59 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm
/ Vienne
Objet: Re: How to delete a user

On Mon, Jul 12, 2010 at 1:36 PM,  <mickael.bailly@free.fr> wrote:
> Hello Couchers,
>
> I'm playing with CouchDB Security features, but can't get a user removal script to work.
> I try to fetch the user object, from the _users database, and then issue a DELETE REST
query (of course, including the revision).
>
> It does not work, and returns an error "doc.type must be user". I went through the wiki
but did not find how to delete a user.
>
> Anyone can help me ?
>
> Regards,
>
> Mickael
>
>
>

What are your GET and DELETE call ?

- benoît

Mime
View raw message