couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r964109 - in /couchdb/branches/1.0.x: share/www/script/test/auth_cache.js src/couchdb/couch_auth_cache.erl
Date Wed, 14 Jul 2010 17:51:09 GMT
Author: fdmanana
Date: Wed Jul 14 17:51:09 2010
New Revision: 964109

URL: http://svn.apache.org/viewvc?rev=964109&view=rev
Log:
Merge revision 964108 from trunk:

Bug fix: badmatch error after deleting a user doc (uncovered by revision 963723).


Modified:
    couchdb/branches/1.0.x/share/www/script/test/auth_cache.js
    couchdb/branches/1.0.x/src/couchdb/couch_auth_cache.erl

Modified: couchdb/branches/1.0.x/share/www/script/test/auth_cache.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/auth_cache.js?rev=964109&r1=964108&r2=964109&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/auth_cache.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/auth_cache.js Wed Jul 14 17:51:09 2010
@@ -225,7 +225,19 @@ couchTests.auth_cache = function(debug) 
     T(misses_after === misses_before);
     T(hits_after === (hits_before + 2));
 
+    T(authDb.deleteDoc(fdmanana).ok);
     T(CouchDB.logout().ok);
+
+    hits_before = hits_after;
+    misses_before = misses_after;
+
+    T(CouchDB.login("fdmanana", "javascript").error === "unauthorized");
+
+    hits_after = hits();
+    misses_after = misses();
+
+    T(misses_after === (misses_before + 1));
+    T(hits_after === hits_before);
   }
 
 

Modified: couchdb/branches/1.0.x/src/couchdb/couch_auth_cache.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/src/couchdb/couch_auth_cache.erl?rev=964109&r1=964108&r2=964109&view=diff
==============================================================================
--- couchdb/branches/1.0.x/src/couchdb/couch_auth_cache.erl (original)
+++ couchdb/branches/1.0.x/src/couchdb/couch_auth_cache.erl Wed Jul 14 17:51:09 2010
@@ -289,7 +289,7 @@ refresh_entry(Db, #doc_info{high_seq = D
         [] ->
             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;



Mime
View raw message