couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject chttpd commit: updated refs/heads/master to 21be898
Date Thu, 16 Jun 2016 22:25:11 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/master c7d0bafac -> 21be89816


Pass user context in couch_doc_open

Fixes bug where a user can't update or delete their own _users doc.

COUCHDB-2991


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/21be8981
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/21be8981
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/21be8981

Branch: refs/heads/master
Commit: 21be898160793be392288b41230fe0ac74255c23
Parents: c7d0baf
Author: Robert Newson <rnewson@apache.org>
Authored: Thu Jun 16 23:24:05 2016 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Jun 16 23:24:05 2016 +0100

----------------------------------------------------------------------
 src/chttpd_db.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/21be8981/src/chttpd_db.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index 9bb94d9..59ccebd 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -1026,7 +1026,8 @@ couch_doc_from_req(Req, DocId, Json) ->
 % couch_doc_open(Db, DocId) ->
 %   couch_doc_open(Db, DocId, nil, []).
 
-couch_doc_open(Db, DocId, Rev, Options) ->
+couch_doc_open(#db{} = Db, DocId, Rev, Options0) ->
+    Options = [{user_ctx, Db#db.user_ctx} | Options0],
     case Rev of
     nil -> % open most recent rev
         case fabric:open_doc(Db, DocId, Options) of


Mime
View raw message