Commit 7dfb678df98b1b9ad420d9cbf4fe74f1553f34a7

Authored by Jacob Vosmaer
1 parent 3bdf0e29

Revert "Actually use the 'user_filter' configuration option"

This reverts commit e9d4587ff11c8510f01dfa184414f73d75b4550b, 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))`.
Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
config/initializers/devise.rb
... ... @@ -223,7 +223,6 @@ Devise.setup do |config|
223 223 method: Gitlab.config.ldap['method'],
224 224 bind_dn: Gitlab.config.ldap['bind_dn'],
225 225 password: Gitlab.config.ldap['password'],
226   - filter: Gitlab.config.ldap['user_filter'],
227 226 name_proc: email_stripping_proc
228 227 end
229 228  
... ... @@ -245,4 +244,4 @@ Devise.setup do |config|
245 244  
246 245 config.omniauth provider['name'].to_sym, *provider_arguments
247 246 end
248   -end
249 247 \ No newline at end of file
  248 +end
... ...