rnewson commented on code in PR #4139:
URL: https://github.com/apache/couchdb/pull/4139#discussion_r1020164565
##########
src/couch/src/couch_httpd_auth.erl:
##########
@@ -99,6 +99,13 @@ basic_name_pw(Req) ->
nil
end.
+extract_roles(UserProps) ->
+ Roles = couch_util:get_value(<<"roles">>, UserProps, []),
+ case lists:member(<<"_admin">>, Roles) of
+ true -> Roles;
+ _ -> [<<"_users">> | Roles]
Review Comment:
hi. going back to ++ is fine if we're confident the list stays quite short,
which seems highly likely.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]