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
103419be
Commit
103419be
authored
Oct 14, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ldap callback definitions to initializer
parent
c8616728
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
app/controllers/omniauth_callbacks_controller.rb
app/controllers/omniauth_callbacks_controller.rb
+0
-4
config/initializers/7_omniauth.rb
config/initializers/7_omniauth.rb
+6
-0
No files found.
app/controllers/omniauth_callbacks_controller.rb
View file @
103419be
...
@@ -32,10 +32,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
...
@@ -32,10 +32,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
end
end
end
end
Gitlab
.
config
.
ldap
.
servers
.
each
do
|
server
|
alias_method
server
.
provider_name
,
:ldap
end
def
omniauth_error
def
omniauth_error
@provider
=
params
[
:provider
]
@provider
=
params
[
:provider
]
@error
=
params
[
:error
]
@error
=
params
[
:error
]
...
...
config/initializers/7_omniauth.rb
View file @
103419be
...
@@ -4,3 +4,9 @@ module OmniAuth::Strategies
...
@@ -4,3 +4,9 @@ module OmniAuth::Strategies
const_set
(
server
.
provider_class
,
Class
.
new
(
LDAP
))
const_set
(
server
.
provider_class
,
Class
.
new
(
LDAP
))
end
end
end
end
OmniauthCallbacksController
.
class_eval
do
Gitlab
.
config
.
ldap
.
servers
.
each
do
|
server
|
alias_method
server
.
provider_name
,
:ldap
end
end
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