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
8beca98d
Commit
8beca98d
authored
Oct 21, 2014
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CE-EE LDAP merge conflicts
parent
e7698225
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
16 deletions
+2
-16
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-9
config/initializers/7_omniauth.rb
config/initializers/7_omniauth.rb
+1
-7
No files found.
config/initializers/1_settings.rb
View file @
8beca98d
...
@@ -61,24 +61,16 @@ Settings.ldap['sync_time'] = 3600 if Settings.ldap['sync_time'].nil?
...
@@ -61,24 +61,16 @@ Settings.ldap['sync_time'] = 3600 if Settings.ldap['sync_time'].nil?
if
Settings
.
ldap
[
'enabled'
]
||
Rails
.
env
.
test?
if
Settings
.
ldap
[
'enabled'
]
||
Rails
.
env
.
test?
if
Settings
.
ldap
[
'host'
].
present?
if
Settings
.
ldap
[
'host'
].
present?
server
=
Settings
.
ldap
.
except
(
'sync_time'
)
server
=
Settings
.
ldap
.
except
(
'sync_time'
)
<<<<<<<
HEAD
server
=
Settingslogic
.
new
(
server
)
server
[
'label'
]
=
'LDAP'
server
[
'label'
]
=
'LDAP'
=======
>>>>>>>
7
-
4
-
stable
server
[
'provider_name'
]
=
'ldap'
server
[
'provider_name'
]
=
'ldap'
Settings
.
ldap
[
'servers'
]
=
{
Settings
.
ldap
[
'servers'
]
=
{
'ldap'
=>
server
'ldap'
=>
server
}
}
end
end
<<<<<<<
HEAD
Settings
.
ldap
[
'servers'
].
map
do
|
key
,
server
|
server
=
Settingslogic
.
new
(
server
)
=======
Settings
.
ldap
[
'servers'
].
each
do
|
key
,
server
|
Settings
.
ldap
[
'servers'
].
each
do
|
key
,
server
|
server
=
Settingslogic
.
new
(
server
)
server
[
'label'
]
||=
'LDAP'
server
[
'label'
]
||=
'LDAP'
>>>>>>>
7
-
4
-
stable
server
[
'allow_username_or_email_login'
]
=
false
if
server
[
'allow_username_or_email_login'
].
nil?
server
[
'allow_username_or_email_login'
]
=
false
if
server
[
'allow_username_or_email_login'
].
nil?
server
[
'active_directory'
]
=
true
if
server
[
'active_directory'
].
nil?
server
[
'active_directory'
]
=
true
if
server
[
'active_directory'
].
nil?
server
[
'provider_name'
]
||=
"ldap
#{
key
}
"
.
downcase
server
[
'provider_name'
]
||=
"ldap
#{
key
}
"
.
downcase
...
...
config/initializers/7_omniauth.rb
View file @
8beca98d
if
Gitlab
::
LDAP
::
Config
.
enabled?
if
Gitlab
::
LDAP
::
Config
.
enabled?
module
OmniAuth::Strategies
module
OmniAuth::Strategies
<<<<<<<
HEAD
Gitlab
::
LDAP
::
Config
.
servers
.
each
do
|
server
|
Gitlab
::
LDAP
::
Config
.
servers
.
each
do
|
server
|
# do not redeclare LDAP
# do not redeclare LDAP
next
if
server
[
'provider_name'
]
==
'ldap'
next
if
server
[
'provider_name'
]
==
'ldap'
const_set
(
server
[
'provider_class'
],
Class
.
new
(
LDAP
))
const_set
(
server
[
'provider_class'
],
Class
.
new
(
LDAP
))
end
end
=======
server
=
Gitlab
.
config
.
ldap
.
servers
.
values
.
first
klass
=
server
[
'provider_class'
]
const_set
(
klass
,
Class
.
new
(
LDAP
))
unless
klass
==
'LDAP'
>>>>>>>
7
-
4
-
stable
end
end
OmniauthCallbacksController
.
class_eval
do
OmniauthCallbacksController
.
class_eval
do
...
@@ -18,4 +12,4 @@ if Gitlab::LDAP::Config.enabled?
...
@@ -18,4 +12,4 @@ if Gitlab::LDAP::Config.enabled?
alias_method
server
[
'provider_name'
],
:ldap
alias_method
server
[
'provider_name'
],
:ldap
end
end
end
end
end
end
\ No newline at end of file
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