Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
94b4c9f3
Commit
94b4c9f3
authored
Jun 08, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use encryption instead of method
The method key is deprecated in the `gitlab_omniauth-ldap` gem.
parent
6dbff966
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
lib/gitlab/ldap/config.rb
lib/gitlab/ldap/config.rb
+2
-2
spec/lib/gitlab/ldap/config_spec.rb
spec/lib/gitlab/ldap/config_spec.rb
+14
-14
No files found.
lib/gitlab/ldap/config.rb
View file @
94b4c9f3
...
...
@@ -50,7 +50,7 @@ module Gitlab
def
omniauth_options
opts
=
base_options
.
merge
(
base:
base
,
method:
options
[
'method
'
],
encryption:
options
[
'encryption
'
],
filter:
omniauth_user_filter
,
name_proc:
name_proc
)
...
...
@@ -158,7 +158,7 @@ module Gitlab
end
def
encryption
case
options
[
'
method
'
].
to_s
case
options
[
'
encryption
'
].
to_s
when
'ssl'
:simple_tls
when
'tls'
...
...
spec/lib/gitlab/ldap/config_spec.rb
View file @
94b4c9f3
...
...
@@ -25,7 +25,7 @@ describe Gitlab::LDAP::Config, lib: true do
options:
{
'host'
=>
'ldap.example.com'
,
'port'
=>
386
,
'
method'
=>
'plain'
'
encryption'
=>
'plain'
}
)
...
...
@@ -41,7 +41,7 @@ describe Gitlab::LDAP::Config, lib: true do
options:
{
'host'
=>
'ldap.example.com'
,
'port'
=>
686
,
'
method'
=>
'ssl'
,
'
encryption'
=>
'ssl'
,
'bind_dn'
=>
'uid=admin,dc=example,dc=com'
,
'password'
=>
'super_secret'
}
...
...
@@ -67,7 +67,7 @@ describe Gitlab::LDAP::Config, lib: true do
'host'
=>
'ldap.example.com'
,
'port'
=>
386
,
'base'
=>
'ou=users,dc=example,dc=com'
,
'
method'
=>
'plain'
,
'
encryption'
=>
'plain'
,
'uid'
=>
'uid'
}
)
...
...
@@ -76,7 +76,7 @@ describe Gitlab::LDAP::Config, lib: true do
host:
'ldap.example.com'
,
port:
386
,
base:
'ou=users,dc=example,dc=com'
,
method
:
'plain'
,
encryption
:
'plain'
,
filter:
'(uid=%{username})'
)
expect
(
config
.
omniauth_options
.
keys
).
not_to
include
(
:bind_dn
,
:password
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment