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

    https://github.com/apache/couchdb-chttpd/pull/12#discussion_r23085805
  
    --- Diff: src/chttpd_db.erl ---
    @@ -248,9 +264,21 @@ delete_db_req(#httpd{}=Req, DbName) ->
             throw(Error)
         end.
     
    +get_db_options(DbName) ->
    +    IsReplicatorDb = DbName == config:get("replicator", "db", 
"_replicator"),
    +    IsUsersDb = DbName ==config:get("chttpd_auth", "authentication_db", 
"_users") orelse
    +    binary_to_list(mem3:dbname(DbName)) == config:get("chttpd_auth", 
"authentication_db", "_users"),
    --- End diff --
    
    @kxepal I was looking at tidying this up and realised I made two mistakes 
here. Firstly, there is no need for the `binary_to_list(mem3:dbname(DbName))` 
comparison because that would only be necessary if DbName was for an individual 
shard - that will never be the case here so that check can be removed.
    
    Secondly, there is no need to check for the replicator DB here because 
chttpd does nothing with that information.
    
    I'll add some commits to fix those things up.


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