You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2022/08/06 14:11:07 UTC
[couchdb] 21/21: chore(access): style notes
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch feat/access-2022
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 79fbe501cfbd155ea170ef302b38514e0264b586
Author: Jan Lehnardt <ja...@apache.org>
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 1f6fdf056..fb5a879ed 100644
--- a/src/couch/src/couch_db_updater.erl
+++ b/src/couch/src/couch_db_updater.erl
@@ -825,7 +825,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 d7bb7b519..81dc7b710 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) ->