summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-22 11:11:18 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-22 11:11:18 +0300
commit05f19392b76d9fbe40d97547ee2a3c87883c9639 (patch)
treec8316cc23a1a6561f6229ff88a8b5f5ba63fd416 /lib
parentc5ad011917af7b11d0d021e77cce471a223a52e5 (diff)
downloadgitlab-ce-05f19392b76d9fbe40d97547ee2a3c87883c9639.tar.gz
Make gitlab ldap check work for old and new syntax
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/gitlab/check.rake4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 707d236068e..56e8ff44988 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -676,11 +676,11 @@ namespace :gitlab do
def print_users(limit)
puts "LDAP users with access to your GitLab server (only showing the first #{limit} results)"
- servers = Gitlab.config.ldap.servers.keys
+ servers = Gitlab::LDAP::Config.providers
servers.each do |server|
puts "Server: #{server}"
- Gitlab::LDAP::Adapter.open("ldap#{server}") do |adapter|
+ Gitlab::LDAP::Adapter.open(server) do |adapter|
users = adapter.users(adapter.config.uid, '*', 100)
users.each do |user|
puts "\tDN: #{user.dn}\t #{adapter.config.uid}: #{user.uid}"