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
9c972754
Commit
9c972754
authored
Jun 07, 2017
by
Douwe Maan
Committed by
Bob Van Landuyt
Jun 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User#ldap_email? is gone
parent
ce24035d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/gitlab/ldap/access.rb
lib/gitlab/ldap/access.rb
+1
-1
spec/lib/gitlab/ldap/access_spec.rb
spec/lib/gitlab/ldap/access_spec.rb
+1
-1
No files found.
lib/gitlab/ldap/access.rb
View file @
9c972754
...
...
@@ -70,7 +70,7 @@ module Gitlab
found_user
=
Gitlab
::
LDAP
::
Person
.
find_by_dn
(
ldap_identity
.
extern_uid
,
adapter
)
return
found_user
if
found_user
if
user
.
ldap_email?
if
user
.
external_email?
&&
[
nil
,
provider
].
include?
(
user
.
email_provider
)
Gitlab
::
LDAP
::
Person
.
find_by_email
(
user
.
email
,
adapter
)
end
end
...
...
spec/lib/gitlab/ldap/access_spec.rb
View file @
9c972754
...
...
@@ -15,7 +15,7 @@ describe Gitlab::LDAP::Access, lib: true do
it
'finds a user by email if the email came from LDAP'
do
expect
(
Gitlab
::
LDAP
::
Person
).
to
receive
(
:find_by_dn
).
and_return
(
nil
)
expect
(
user
).
to
receive
(
:
ldap
_email?
).
and_return
(
true
)
expect
(
user
).
to
receive
(
:
external
_email?
).
and_return
(
true
)
expect
(
Gitlab
::
LDAP
::
Person
).
to
receive
(
:find_by_email
)
access
.
find_ldap_user
...
...
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