Revert "Actually use the 'user_filter' configuration option"
This reverts commite9d4587ff1
, 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](982d4d51e8/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](76d77543de/lib/omniauth/strategies/ldap.rb (L55)
) Example omniauth-ldap user filter: `(&(uid=%{username})(memberOf=cn=foo,dc=bar))`.
This commit is contained in:
parent
3bdf0e2921
commit
7dfb678df9
|
@ -223,7 +223,6 @@ Devise.setup do |config|
|
||||||
method: Gitlab.config.ldap['method'],
|
method: Gitlab.config.ldap['method'],
|
||||||
bind_dn: Gitlab.config.ldap['bind_dn'],
|
bind_dn: Gitlab.config.ldap['bind_dn'],
|
||||||
password: Gitlab.config.ldap['password'],
|
password: Gitlab.config.ldap['password'],
|
||||||
filter: Gitlab.config.ldap['user_filter'],
|
|
||||||
name_proc: email_stripping_proc
|
name_proc: email_stripping_proc
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -245,4 +244,4 @@ Devise.setup do |config|
|
||||||
|
|
||||||
config.omniauth provider['name'].to_sym, *provider_arguments
|
config.omniauth provider['name'].to_sym, *provider_arguments
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue