Skip to content

Commit

Permalink
Revert "Actually use the 'user_filter' configuration option"
Browse files Browse the repository at this point in the history
This reverts commit e9d4587, which is
incompatible with GitLab's built in LDAP user filter: a GitLab LDAP
filter is [added on top of the other filters used to find the
user](https://gitlab.com/gitlab-org/gitlab-ce/blob/982d4d51e8110bec280eb00db0fb756b062103d9/lib/gitlab/ldap/adapter.rb#L61)

Example GitLab LDAP filter: `(memberOf=cn=foo,dc=bar)`.

In contrast, an omniauth-ldap filter [replaces the 'normal'
filters](https://gitlab.com/gitlab-org/omniauth-ldap/blob/76d77543dec0c585bb4e974262f43675f9810953/lib/omniauth/strategies/ldap.rb#L55)

Example omniauth-ldap user filter:
`(&(uid=%{username})(memberOf=cn=foo,dc=bar))`.
  • Loading branch information
jacobvosmaer committed May 29, 2014
1 parent 13202d8 commit 6d896ed
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@
method: Gitlab.config.ldap['method'],
bind_dn: Gitlab.config.ldap['bind_dn'],
password: Gitlab.config.ldap['password'],
filter: Gitlab.config.ldap['user_filter'],
name_proc: email_stripping_proc
end

Expand All @@ -245,4 +244,4 @@

config.omniauth provider['name'].to_sym, *provider_arguments
end
end
end

0 comments on commit 6d896ed

Please sign in to comment.