[Pkg-erlang-commits] r1281 - in couchdb/trunk/debian: . patches

sbisbee-guest at alioth.debian.org sbisbee-guest at alioth.debian.org
Tue Sep 7 21:06:04 UTC 2010


Author: sbisbee-guest
Date: 2010-09-07 21:05:55 +0000 (Tue, 07 Sep 2010)
New Revision: 1281

Removed:
   couchdb/trunk/debian/patches/auth_cache.patch
   couchdb/trunk/debian/patches/remove_users.patch
Modified:
   couchdb/trunk/debian/changelog
Log:
Removing 1.0.0 patches that are in 1.0.1, and modifying upstream changelog entry

Modified: couchdb/trunk/debian/changelog
===================================================================
--- couchdb/trunk/debian/changelog	2010-09-07 20:52:47 UTC (rev 1280)
+++ couchdb/trunk/debian/changelog	2010-09-07 21:05:55 UTC (rev 1281)
@@ -16,9 +16,7 @@
 
   [ Elliot Murphy ]
   * split into couchdb and couchdb-bin (closes: #573061)
-  * New upstream release 1.0
-  * Added auth_cache.patch and remove_users.patch to fix problems with deleting
-    users and auth caches after final user is removed.
+  * New upstream release 1.0.1
   * Drop debian/patches/couch_app.erl (included upstream now).
 
  -- Sam Bisbee <sbisbee at computervip.com>  Mon, 02 Aug 2010 01:52:41 -0400

Deleted: couchdb/trunk/debian/patches/auth_cache.patch
===================================================================
--- couchdb/trunk/debian/patches/auth_cache.patch	2010-09-07 20:52:47 UTC (rev 1280)
+++ couchdb/trunk/debian/patches/auth_cache.patch	2010-09-07 21:05:55 UTC (rev 1281)
@@ -1,15 +0,0 @@
-Description: fix badmatch error after deleting a user doc
-Origin: upstream: http://svn.apache.org/viewvc?view=revision&revision=964108
-diff --git a/src/couchdb/couch_auth_cache.erl b/src/couchdb/couch_auth_cache.erl
-index bff801f..078bfcc 100644
---- a/src/couchdb/couch_auth_cache.erl
-+++ b/src/couchdb/couch_auth_cache.erl
-@@ -289,7 +289,7 @@ refresh_entry(Db, #doc_info{high_seq = DocSeq} = DocInfo) ->
-         [] ->
-             ok;
-         [{UserName, {_OldCreds, ATime}}] ->
--            {ok, Doc} = couch_db:open_doc(Db, DocInfo, [conflicts]),
-+            {ok, Doc} = couch_db:open_doc(Db, DocInfo, [conflicts, deleted]),
-             NewCreds = user_creds(Doc),
-             true = ets:insert(?BY_USER, {UserName, {NewCreds, ATime}})
-         end;

Deleted: couchdb/trunk/debian/patches/remove_users.patch
===================================================================
--- couchdb/trunk/debian/patches/remove_users.patch	2010-09-07 20:52:47 UTC (rev 1280)
+++ couchdb/trunk/debian/patches/remove_users.patch	2010-09-07 21:05:55 UTC (rev 1281)
@@ -1,47 +0,0 @@
-Description: test and fix for deleting users documents.
-Origin: upstream, http://svn.apache.org/viewvc?view=revision&revision=963723
-diff --git a/share/www/script/test/users_db.js b/share/www/script/test/users_db.js
-index b85adf0..667ff3c 100644
---- a/share/www/script/test/users_db.js
-+++ b/share/www/script/test/users_db.js
-@@ -85,8 +85,13 @@ couchTests.users_db = function(debug) {
-       T(/conflict/.test(e.reason))
-     }
- 
-+    // you can delete a user doc
-+    s = CouchDB.session().userCtx;
-+    T(s.name == null);
-+    T(s.roles.indexOf("_admin") !== -1);
-+    T(usersDb.deleteDoc(jchrisWithConflict).ok);
-   };
--  
-+
-   usersDb.deleteDb();
-   run_on_modified_server(
-     [{section: "couch_httpd_auth",
-diff --git a/src/couchdb/couch_js_functions.hrl b/src/couchdb/couch_js_functions.hrl
-index 3214b1f..1f314f6 100644
---- a/src/couchdb/couch_js_functions.hrl
-+++ b/src/couchdb/couch_js_functions.hrl
-@@ -12,10 +12,6 @@
- 
- -define(AUTH_DB_DOC_VALIDATE_FUNCTION, <<"
-     function(newDoc, oldDoc, userCtx) {
--        if ((oldDoc && oldDoc.type !== 'user') || newDoc.type !== 'user') {
--            throw({forbidden : 'doc.type must be user'});
--        } // we only allow user docs for now
--
-         if (newDoc._deleted === true) {
-             // allow deletes by admins and matching users
-             // without checking the other fields
-@@ -27,6 +23,10 @@
-             }
-         }
- 
-+        if ((oldDoc && oldDoc.type !== 'user') || newDoc.type !== 'user') {
-+            throw({forbidden : 'doc.type must be user'});
-+        } // we only allow user docs for now
-+
-         if (!newDoc.name) {
-             throw({forbidden: 'doc.name is required'});
-         }




More information about the Pkg-erlang-commits mailing list