فهرست منبع

Lowercasing all group names before assigning them as roles. Fixes #7

Daniel Moore 11 سال پیش
والد
کامیت
7f3ed1652a
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/ldap_auth.erl

+ 2 - 2
src/ldap_auth.erl

@@ -246,7 +246,7 @@ authenticate_user(UserName, Password) ->
         {ok, UserDN} ->
           Groups = get_group_memberships(LdapConnection, UserDN),
           eldap:close(LdapConnection),
-          {ok, [ ?l2b(G) || G <- Groups ]}
+          {ok, [ ?l2b(string:to_lower(G)) || G <- Groups ]}
       end
   end.
 
@@ -267,4 +267,4 @@ basic_name_pw(Req) ->
     _ ->
       ?LOG_INFO("Could not recognize auth header ~p", [AuthorizationHeader]),
       nil
-  end.
+  end.