Github user eiri commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/150#discussion_r87641585
  
    --- Diff: src/chttpd_db.erl ---
    @@ -83,7 +83,8 @@ 
handle_changes_req(#httpd{path_parts=[_,<<"_changes">>]}=Req, _Db) ->
     handle_changes_req1(#httpd{}=Req, Db) ->
         #changes_args{filter=Raw, style=Style} = Args0 = 
parse_changes_query(Req),
         ChangesArgs = Args0#changes_args{
    -        filter_fun = couch_changes:configure_filter(Raw, Style, Req, Db)
    +        filter_fun = couch_changes:configure_filter(Raw, Style, Req, Db),
    +        db_open_options = [{user_ctx, Db#db.user_ctx}]
    --- End diff --
    
    To be honest I pulled it from Db exactly for consistency reason. First, 
this is what we've been doing previously, i.e. passing Db and _its_ user 
context and propagating UserCtx. Second, we are opening db in fabric with db 
open options, so for me it seems more natural to do that with the same options 
that was used to open db here, rather than pull context from request record. 
Plus if (when) we move to Cowboy it'll be one less place to chase and change.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to