BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
fc5bfd1d
Commit
fc5bfd1d
authored
Oct 14, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move dynamic omniauth declarations to initializer
parent
93505f7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
omniauth_callbacks_controller.rb
app/controllers/omniauth_callbacks_controller.rb
+0
-4
7_omniauth.rb
config/initializers/7_omniauth.rb
+6
-0
No files found.
app/controllers/omniauth_callbacks_controller.rb
View file @
fc5bfd1d
...
...
@@ -32,10 +32,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
end
end
Gitlab
.
config
.
ldap
.
servers
.
each
do
|
server
|
alias_method
server
.
provider_name
,
:ldap
end
def
omniauth_error
@provider
=
params
[
:provider
]
@error
=
params
[
:error
]
...
...
config/initializers/7_omniauth.rb
View file @
fc5bfd1d
...
...
@@ -2,3 +2,8 @@ module OmniAuth::Strategies
server
=
Gitlab
.
config
.
ldap
.
servers
.
first
const_set
(
server
.
provider_class
,
Class
.
new
(
LDAP
))
end
OmniauthCallbacksController
.
class_eval
do
server
=
Gitlab
.
config
.
ldap
.
servers
.
first
alias_method
server
.
provider_name
,
:ldap
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