提交 7f92a36a 编写于 作者: M Michael Kozono

Fix plain LDAP (no encryption)

上级 951bd2a4
......@@ -61,7 +61,7 @@ gem 'browser', '~> 2.2'
# LDAP Auth
# GitLab fork with several improvements to original library. For full list of changes
# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
gem 'gitlab_omniauth-ldap', '~> 2.0.1', require: 'omniauth-ldap'
gem 'gitlab_omniauth-ldap', '~> 2.0.2', require: 'omniauth-ldap'
# Git Wiki
# Required manually in config/initializers/gollum.rb to control load order
......
......@@ -288,7 +288,7 @@ GEM
mime-types (>= 1.16, < 3)
posix-spawn (~> 0.3)
gitlab-markup (1.5.1)
gitlab_omniauth-ldap (2.0.1)
gitlab_omniauth-ldap (2.0.2)
net-ldap (~> 0.16)
omniauth (~> 1.3)
pyu-ruby-sasl (>= 0.0.3.3, < 0.1)
......@@ -978,7 +978,7 @@ DEPENDENCIES
github-linguist (~> 4.7.0)
gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-markup (~> 1.5.1)
gitlab_omniauth-ldap (~> 2.0.1)
gitlab_omniauth-ldap (~> 2.0.2)
gollum-lib (~> 4.2)
gollum-rugged_adapter (~> 0.4.4)
gon (~> 6.1.0)
......
......@@ -169,9 +169,12 @@ module Gitlab
def encryption_options
method = translate_method(options['encryption'])
options = { method: method }
options[:tls_options] = tls_options(method) if method
options
return nil unless method
{
method: method,
tls_options: tls_options(method)
}
end
def translate_method(method_from_config)
......
......@@ -32,7 +32,7 @@ describe Gitlab::LDAP::Config, lib: true do
expect(config.adapter_options).to eq(
host: 'ldap.example.com',
port: 386,
encryption: { method: nil }
encryption: nil
)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册