I've never tried out COPY, but I suspect this is because when you copy
the document over, the document's 'name' property stays the same
('[email protected]'). When the new document is validated, it has an ID of
'org.couchdb.user:xxx', but the name property is '[email protected]'. The
validation rule requires that the document ID is 'org.couchdb.user:'
followed by the name.If you want to rename a user, you'll probably need to PUT the new user document manually with an updated 'name' property. On 5 March 2011 10:07, Mark Hahn <[email protected]> wrote: > When I try a copy request in the _users db I get the error ... > > 403, forbidden, Doc ID must be of the form org.couchdb.user:name > > The request as shown in the couch log is : > > [debug] [<0.26409.36>] "COPY" /_users/org.couchdb.user%3Aq%40q.qa {1,1} > Headers: [{'Connection',"close"}, > {'Content-Type',"application/json"}, > {'Cookie'," ... snip ..."}, > {"Destination","org.couchdb.user:xxx"}, > {'Host',"localhost"}, > {'Transfer-Encoding',"chunked"}] > > I've also tried encoding the Destination header > as {"Destination","org.couchdb.user%3Axxx"}. > > The request path is url encoded the same way as in all of my other working > requests. The id shown above works in get, put, etc. I'm using > jquery.couch.js so I'm pretty sure the only thing I could be doing wrong is > the Destination header. jquery.couch.js is formatting everything but the > headers. > > Any ideas? >
