couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r918855 - in /couchdb/trunk: share/www/script/test/reader_acl.js src/couchdb/couch_db.erl
Date Thu, 04 Mar 2010 05:16:00 GMT
Author: jchris
Date: Thu Mar  4 05:16:00 2010
New Revision: 918855

URL: http://svn.apache.org/viewvc?rev=918855&view=rev
Log:
ensure full commit when the security object is updated

Modified:
    couchdb/trunk/share/www/script/test/reader_acl.js
    couchdb/trunk/src/couchdb/couch_db.erl

Modified: couchdb/trunk/share/www/script/test/reader_acl.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/reader_acl.js?rev=918855&r1=918854&r2=918855&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/reader_acl.js (original)
+++ couchdb/trunk/share/www/script/test/reader_acl.js Thu Mar  4 05:16:00 2010
@@ -41,6 +41,11 @@
           names : ["joe","barb"]
         }
       }).ok);
+      
+      usersDb.ensureFullCommit();
+      // security changes will always commit synchronously
+      restartServer();
+      
       // can't read it as jchris
       T(CouchDB.login("jchris@apache.org", "funnybone").ok);
       T(CouchDB.session().userCtx.name == "jchris@apache.org");

Modified: couchdb/trunk/src/couchdb/couch_db.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_db.erl?rev=918855&r1=918854&r2=918855&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_db.erl (original)
+++ couchdb/trunk/src/couchdb/couch_db.erl Thu Mar  4 05:16:00 2010
@@ -291,7 +291,9 @@
 set_security(#db{update_pid=Pid}=Db, {NewSecProps}) when is_list(NewSecProps) ->
     check_is_admin(Db),
     ok = validate_security_object(NewSecProps),
-    gen_server:call(Pid, {set_security, NewSecProps}, infinity);
+    ok = gen_server:call(Pid, {set_security, NewSecProps}, infinity),
+    {ok, _} = ensure_full_commit(Db),
+    ok;
 set_security(_, _) ->
     throw(bad_request).
 



Mime
View raw message