| ... | @@ -33,10 +33,15 @@ module SystemCheck |
... | @@ -33,10 +33,15 @@ module SystemCheck |
|
|
$stdout.puts "LDAP users with access to your GitLab server (only showing the first #{limit} results)"
|
|
$stdout.puts "LDAP users with access to your GitLab server (only showing the first #{limit} results)"
|
|
|
|
|
|
|
|
users = adapter.users(adapter.config.uid, '*', limit)
|
|
users = adapter.users(adapter.config.uid, '*', limit)
|
|
|
|
|
|
|
|
if should_sanitize?
|
|
|
|
$stdout.puts "\tUser output sanitized. Found #{users.length} users of #{limit} limit."
|
|
|
|
else
|
|
|
users.each do |user|
|
|
users.each do |user|
|
|
|
$stdout.puts "\tDN: #{user.dn}\t #{adapter.config.uid}: #{user.uid}"
|
|
$stdout.puts "\tDN: #{user.dn}\t #{adapter.config.uid}: #{user.uid}"
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
|
end
|
|
|
rescue Net::LDAP::ConnectionRefusedError, Errno::ECONNREFUSED => e
|
|
rescue Net::LDAP::ConnectionRefusedError, Errno::ECONNREFUSED => e
|
|
|
$stdout.puts "Could not connect to the LDAP server: #{e.message}".color(:red)
|
|
$stdout.puts "Could not connect to the LDAP server: #{e.message}".color(:red)
|
|
|
end
|
|
end
|
| ... | |
... | |
| ... | | ... | |