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, <[email protected]> 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
>
>
>

Reply via email to