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

    https://github.com/apache/couchdb-chttpd/pull/53#discussion_r36727859
  
    --- Diff: src/chttpd_auth.erl ---
    @@ -12,15 +12,69 @@
     
     -module(chttpd_auth).
     
    +-export([authenticate/2]).
    +-export([authorize/2]).
    +
     -export([default_authentication_handler/1]).
     -export([cookie_authentication_handler/1]).
    +-export([local_admin_handler/1]).
    +
     -export([handle_session_req/1]).
     
    +-include_lib("couch/include/couch_db.hrl").
    +
    +-define(SERVICE_ID, chttpd_auth).
    +
    +
    +%% ------------------------------------------------------------------
    +%% API Function Definitions
    +%% ------------------------------------------------------------------
    +
    +authenticate(HttpReq, Default) ->
    +    maybe_handle(authenticate, [HttpReq], Default).
    +
    +authorize(HttpReq, Default) ->
    +    maybe_handle(authorize, [HttpReq], Default).
    +
    +
    +%% ------------------------------------------------------------------
    +%% Default callbacks
    +%% ------------------------------------------------------------------
    +
     default_authentication_handler(Req) ->
         couch_httpd_auth:default_authentication_handler(Req, 
chttpd_auth_cache).
     
     cookie_authentication_handler(Req) ->
         couch_httpd_auth:cookie_authentication_handler(Req, chttpd_auth_cache).
     
    +local_admin_handler(Req) ->
    --- End diff --
    
    actually, this should be called `party_mode_handler`, it exists only to 
grant admin rights to any user if there are no admins, it does not authenticate 
admins.


---
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