You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/11/11 12:11:22 UTC

[GitHub] [couchdb] rnewson commented on a diff in pull request #4139: [WIP, but please review]: per-doc-access-control

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: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org