Author: jchris
Date: Thu Mar  4 05:17:44 2010
New Revision: 918856

URL: http://svn.apache.org/viewvc?rev=918856&view=rev
Log:
backport 918855 to 0.11.x

Modified:
    couchdb/branches/0.11.x/   (props changed)
    couchdb/branches/0.11.x/etc/default/couchdb   (props changed)
    couchdb/branches/0.11.x/share/www/script/test/reader_acl.js
    couchdb/branches/0.11.x/src/couchdb/couch_db.erl

Propchange: couchdb/branches/0.11.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar  4 05:17:44 2010
@@ -6,4 +6,4 @@
 /couchdb/branches/list-iterator:782292-784593
 /couchdb/branches/tail_header:775760-778477
 /couchdb/tags/0.10.0:825400
-/couchdb/trunk:909247,910054,910696,910910-910911,911544,911559,911578,911602,911717,911837,912474,912606,912608,912615,912636,915526,915529-915530,915827,916076,916153,916518,916521,917553
+/couchdb/trunk:909247,910054,910696,910910-910911,911544,911559,911578,911602,911717,911837,912474,912606,912608,912615,912636,915526,915529-915530,915827,916076,916153,916518,916521,917553,918855

Propchange: couchdb/branches/0.11.x/etc/default/couchdb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar  4 05:17:44 2010
@@ -6,5 +6,5 @@
 /couchdb/branches/list-iterator/etc/default/couchdb:782292-784593
 /couchdb/branches/tail_header/etc/default/couchdb:775760-778477
 /couchdb/tags/0.10.0/etc/default/couchdb:825400
-/couchdb/trunk/etc/default/couchdb:909247,910054,910696,911544,911602,911717,911837,912474,912606,912608,912615,912636,915526,915529-915530,915827,916076,916153,916518,916521,917553
+/couchdb/trunk/etc/default/couchdb:909247,910054,910696,911544,911602,911717,911837,912474,912606,912608,912615,912636,915526,915529-915530,915827,916076,916153,916518,916521,917553,918855
 /incubator/couchdb/trunk/etc/default/couchdb:642419-694440

Modified: couchdb/branches/0.11.x/share/www/script/test/reader_acl.js
URL: 
http://svn.apache.org/viewvc/couchdb/branches/0.11.x/share/www/script/test/reader_acl.js?rev=918856&r1=918855&r2=918856&view=diff
==============================================================================
--- couchdb/branches/0.11.x/share/www/script/test/reader_acl.js (original)
+++ couchdb/branches/0.11.x/share/www/script/test/reader_acl.js Thu Mar  4 
05:17:44 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("jch...@apache.org", "funnybone").ok);
       T(CouchDB.session().userCtx.name == "jch...@apache.org");

Modified: couchdb/branches/0.11.x/src/couchdb/couch_db.erl
URL: 
http://svn.apache.org/viewvc/couchdb/branches/0.11.x/src/couchdb/couch_db.erl?rev=918856&r1=918855&r2=918856&view=diff
==============================================================================
--- couchdb/branches/0.11.x/src/couchdb/couch_db.erl (original)
+++ couchdb/branches/0.11.x/src/couchdb/couch_db.erl Thu Mar  4 05:17:44 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).
 


Reply via email to