Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/auth/ldap/config.rb')
-rw-r--r--lib/gitlab/auth/ldap/config.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/auth/ldap/config.rb b/lib/gitlab/auth/ldap/config.rb
index ed7caf84558..15e8cb04ea4 100644
--- a/lib/gitlab/auth/ldap/config.rb
+++ b/lib/gitlab/auth/ldap/config.rb
@@ -94,7 +94,7 @@ module Gitlab
def omniauth_options
opts = base_options.merge(
base: base,
- encryption: options['encryption'],
+ encryption: encryption,
filter: omniauth_user_filter,
name_proc: name_proc,
disable_verify_certificates: !options['verify_certificates'],
@@ -188,6 +188,10 @@ module Gitlab
options['sync_name']
end
+ def encryption
+ options['encryption'] || 'plain'
+ end
+
def name_proc
if allow_username_or_email_login
proc { |name| name.gsub(/@.*\z/, '') }
@@ -235,7 +239,7 @@ module Gitlab
end
def translate_method
- NET_LDAP_ENCRYPTION_METHOD[options['encryption']&.to_sym]
+ NET_LDAP_ENCRYPTION_METHOD[encryption.to_sym]
end
def tls_options