HTTP DELETE method not working for documents in _users database
---------------------------------------------------------------
Key: COUCHDB-1096
URL: https://issues.apache.org/jira/browse/COUCHDB-1096
Project: CouchDB
Issue Type: Bug
Components: HTTP Interface
Affects Versions: 1.0.2
Environment: CouchDBX 1.0.2
Reporter: Paul Mietz Egli
Clicking on the "Delete Document" button when viewing a document in the _users
database results in a popup that says "The document could not be deleted:
doc.type must be user". The log shows a DELETE request to the proper document
URL (with rev) and a 403 error. To determine if the problem was limited to
Futon, I double checked with curl as follows:
curl -X DELETE
http://admin:password@localhost:5984/_users/org.couchdb.user:myusername?rev=3-24475d94a04d4518675303bb949e4e6b
{"error":"forbidden","reason":"doc.type must be user"}
It appears that the problem is that the _deleted document property isn't being
set prior to the call to the validate function defined in
couch_js_functions.hrl.
The workaround for deleting a user document is to set "_deleted" : "true" on
the doc.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira