Skip to content

Commit

Permalink
Lowercasing all group names before assigning them as roles. Fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmoore committed May 18, 2014
1 parent c6135ee commit 7f3ed16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ldap_auth.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -267,4 +267,4 @@ basic_name_pw(Req) ->
_ ->
?LOG_INFO("Could not recognize auth header ~p", [AuthorizationHeader]),
nil
end.
end.

0 comments on commit 7f3ed16

Please sign in to comment.