You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Paul Mietz Egli (JIRA)" <ji...@apache.org> on 2011/03/21 19:13:05 UTC
[jira] [Created] (COUCHDB-1096) HTTP DELETE method not working for
documents in _users database
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
[jira] [Resolved] (COUCHDB-1096) HTTP DELETE method not working for
documents in _users database
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Newson resolved COUCHDB-1096.
------------------------------------
Resolution: Invalid
This has been fixed in an earlier release but _users/_design/_auth is not automatically updated if present. Delete it and restart couch to get the latest version.
> 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