couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r825485 - /couchdb/trunk/src/couchdb/couch_rep.erl
Date Thu, 15 Oct 2009 12:55:48 GMT
Author: jan
Date: Thu Oct 15 12:55:48 2009
New Revision: 825485

URL: http://svn.apache.org/viewvc?rev=825485&view=rev
Log:
Only check for admin user if we are trying to create a database. Thanks to Bob Dionne for
testing the patch.

Modified:
    couchdb/trunk/src/couchdb/couch_rep.erl

Modified: couchdb/trunk/src/couchdb/couch_rep.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_rep.erl?rev=825485&r1=825484&r2=825485&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_rep.erl (original)
+++ couchdb/trunk/src/couchdb/couch_rep.erl Thu Oct 15 12:55:48 2009
@@ -462,9 +462,10 @@
 open_db(<<"https://",_/binary>>=Url, _, CreateTarget) ->
     open_db({[{<<"url">>,Url}]}, [], CreateTarget);
 open_db(<<DbName/binary>>, UserCtx, CreateTarget) ->
-    ok = couch_httpd:verify_is_server_admin(UserCtx),
     case CreateTarget of
-    true -> couch_server:create(DbName, [{user_ctx, UserCtx}]);
+    true -> 
+        ok = couch_httpd:verify_is_server_admin(UserCtx),
+        couch_server:create(DbName, [{user_ctx, UserCtx}]);
     false -> ok
     end,
 



Mime
View raw message