This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch rebase/access-2023
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit d15f23b0904ad0b1d8298d6ad15029e2e271d39f
Author: Jan Lehnardt <[email protected]>
AuthorDate: Sat Aug 6 15:39:05 2022 +0200

    chore(access): style notes
---
 src/couch/src/couch_db_updater.erl | 2 +-
 src/couch/src/couch_httpd_auth.erl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/couch/src/couch_db_updater.erl 
b/src/couch/src/couch_db_updater.erl
index 6d6a33f57..ee7080dd5 100644
--- a/src/couch/src/couch_db_updater.erl
+++ b/src/couch/src/couch_db_updater.erl
@@ -829,7 +829,7 @@ validate_docs_access(Db, UserCtx, [Docs | DocRest], 
[OldInfo | OldInfoRest], Doc
             true -> % if valid, then send to DocsListValidated, OldDocsInfo
                     % and store the access context on the new doc
                 [{Client, Doc} | Acc];
-            _Else2 -> % if invalid, then send_result tagged `access`(c.f. 
`conflict)
+            false -> % if invalid, then send_result tagged `access`(c.f. 
`conflict)
                       % and don’t add to DLV, nor ODI
                 send_result(Client, Doc, access),
                 Acc
diff --git a/src/couch/src/couch_httpd_auth.erl 
b/src/couch/src/couch_httpd_auth.erl
index 4304ed9d1..e8d56d3c9 100644
--- a/src/couch/src/couch_httpd_auth.erl
+++ b/src/couch/src/couch_httpd_auth.erl
@@ -103,7 +103,7 @@ extract_roles(UserProps) ->
     Roles = couch_util:get_value(<<"roles">>, UserProps, []),
     case lists:member(<<"_admin">>, Roles) of
         true -> Roles;
-        _ -> Roles ++ [<<"_users">>]
+        _ -> [<<"_users">> | Roles]
     end.
 
 default_authentication_handler(Req) ->

Reply via email to