You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by mi...@free.fr on 2010/07/12 13:36:05 UTC
How to delete a user
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
Re: How to delete a user
Posted by payam yousefi <pa...@gmail.com>.
Hello Mickael
This exception come from _user database 'validate_doc_update' (located at
"_users/_design/_auth"), this validations check always call before
committing any change .
you get exception at this part of validations check :*
if ((oldDoc || newDoc).type != 'user') {
throw({forbidden : 'doc.type must be user'});
}*
maybe you just need to set "type : user " in your user document before try
to remove.
Regards,
Payam.
On Mon, Jul 12, 2010 at 4:06 PM, <mi...@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
>
>
>
Re: How to delete a user
Posted by Benoit Chesneau <bc...@gmail.com>.
On Mon, Jul 12, 2010 at 1:36 PM, <mi...@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