couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mickael.bai...@free.fr
Subject Re: [VOTE] Apache CouchDB 1.0.0 release, second round
Date Mon, 12 Jul 2010 15:32:52 GMT
Hello y'all,

I don't know if it's a showstopper, but the current _design/auth/validate_doc_update of the
_users database seems buggy :
I can't delete a user. I use the tarball of 1.0.0 release, second round.

When deleting a user, using the DELETE Rest Query, with server admin credentials, newDoc takes
the form of :

{"_id":"org.couchdb.user:joe","_rev":"1-3aa8c71e227226e1363a759839a572d8","_deleted":true,"_revisions":{"start":1,"ids":["3aa8c71e227226e1363a759839a572d8"]}}

The type: "user" field is not present. That makes the validate_doc_update refuse the deletion.

The fix I found is in the first line of _design/auth/validate_doc_update :

replace :

if ((oldDoc && oldDoc.type !== 'user') || newDoc.type !== 'user' ) {

with

if ((oldDoc && oldDoc.type !== 'user') || (newDoc.type !== 'user' && newDoc._deleted
!== true ) ) {

and it works. I'm not sure this fix is enough...

Perhaps I missed something, but I could not find infos about deleting user in the wiki nor
in the "definitive guide". 

Regard,

Mickael


----- Mail Original -----
De: "Noah Slater" <nslater@tumbolia.org>
À: dev@couchdb.apache.org
Envoyé: Vendredi 9 Juillet 2010 18h55:31 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm
/ Vienne
Objet: [VOTE] Apache CouchDB 1.0.0 release, second round

Hello,

I would like call a vote for the Apache CouchDB 1.0.0 release, second round.

Changes in this round:

	* Fixed various leftovers from internal refactoring

We encourage the whole community to download and test these release artifacts so
that any critical issues can be resolved before the release is made. Everyone is
free to vote on this release, so get stuck in!

We are voting on the following release artifacts:

http://people.apache.org/~nslater/dist/1.0.0/

These artifacts have been built from the 1.0.0 tag in Subversion:

http://svn.apache.org/repos/asf/couchdb/tags/1.0.0/

Happy voting,

N

Mime
View raw message