Gitlab 6.7 LDAP user_filter not working
Created by: sykano
If I set the user_filter to something like "(memberOf=cn=Group,ou=Groups,dc=domain,dc=name)" it doesn't work. People that are not in the group can still log in. The filter doesn't seem to be used.
If I add a line in config/initializers/devise.rb it works.
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 50669ec..c70dbe2 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -223,6 +223,7 @@ Devise.setup do |config|
method: Gitlab.config.ldap['method'],
bind_dn: Gitlab.config.ldap['bind_dn'],
password: Gitlab.config.ldap['password'],
+ user_filter: Gitlab.config.ldap['user_filter'],
name_proc: email_stripping_proc
end
If I remove that line it still works, which is weird. If I add the line and unset user_filter in config/gitlab.yml, it doesn't work again. If I remove that line it still doesn't work. And so on. Sometimes it didn't even work with the line. Sometimes it did.