You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by kxepal <gi...@git.apache.org> on 2015/01/09 18:07:19 UTC

[GitHub] couchdb-chttpd pull request: Add users db security rules on cluste...

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

    https://github.com/apache/couchdb-chttpd/pull/12#discussion_r22728039
  
    --- 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 --
    
    This definitely need to be simplified: no need to get the same config value twice. Also, without indention this a bit confuses.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---