Skip to content

Commit

Permalink
Make sure the filters are applied
Browse files Browse the repository at this point in the history
  • Loading branch information
jewilmeer committed Oct 14, 2014
1 parent b229b0f commit d3056fe
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/gitlab/ldap/authentication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ def config
end

def user_filter(login)
Net::LDAP::Filter.eq(config.uid, login).tap do |filter|
# Apply LDAP user filter if present
if config.user_filter.present?
Net::LDAP::Filter.join(
filter,
Net::LDAP::Filter.construct(config.user_filter)
)
end
filter = Net::LDAP::Filter.eq(config.uid, login)

# Apply LDAP user filter if present
if config.user_filter.present?
filter = Net::LDAP::Filter.join(
filter,
Net::LDAP::Filter.construct(config.user_filter)
)
end
filter
end

def user
Expand Down

0 comments on commit d3056fe

Please sign in to comment.