summaryrefslogtreecommitdiff
path: root/lib/system_check/ldap_check.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system_check/ldap_check.rb')
-rw-r--r--lib/system_check/ldap_check.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/system_check/ldap_check.rb b/lib/system_check/ldap_check.rb
index 619fb3cccb8..45fd6285829 100644
--- a/lib/system_check/ldap_check.rb
+++ b/lib/system_check/ldap_check.rb
@@ -3,18 +3,18 @@
module SystemCheck
# Used by gitlab:ldap:check rake task
class LdapCheck < BaseCheck
- set_name 'LDAP:'
+ set_name "LDAP:"
def multi_check
if Gitlab::Auth::LDAP::Config.enabled?
# Only show up to 100 results because LDAP directories can be very big.
# This setting only affects the `rake gitlab:check` script.
- limit = ENV['LDAP_CHECK_LIMIT']
+ limit = ENV["LDAP_CHECK_LIMIT"]
limit = 100 if limit.blank?
check_ldap(limit)
else
- $stdout.puts 'LDAP is disabled in config/gitlab.yml'
+ $stdout.puts "LDAP is disabled in config/gitlab.yml"
end
end
@@ -32,7 +32,7 @@ module SystemCheck
$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)
users.each do |user|
$stdout.puts "\tDN: #{user.dn}\t #{adapter.config.uid}: #{user.uid}"
end
@@ -47,12 +47,12 @@ module SystemCheck
auth = adapter.config.has_auth?
message = if auth && adapter.ldap.bind
- 'Success'.color(:green)
- elsif auth
- 'Failed. Check `bind_dn` and `password` configuration values'.color(:red)
- else
- 'Anonymous. No `bind_dn` or `password` configured'.color(:yellow)
- end
+ "Success".color(:green)
+ elsif auth
+ "Failed. Check `bind_dn` and `password` configuration values".color(:red)
+ else
+ "Anonymous. No `bind_dn` or `password` configured".color(:yellow)
+ end
$stdout.puts "LDAP authentication... #{message}"
end