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
887895bf
Commit
887895bf
authored
Feb 18, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compatibility with old configs where url does not exist
parent
07a0e729
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+9
-1
No files found.
config/initializers/1_settings.rb
View file @
887895bf
...
...
@@ -92,10 +92,18 @@ Settings.omniauth['enabled'] = false if Settings.omniauth['enabled'].nil?
Settings
.
omniauth
[
'providers'
]
||=
[]
# Fill out omniauth-gitlab settings. It is needed for easy set up GHE or GH by just specifying url.
github_default_url
=
"https://github.com"
github_settings
=
Settings
.
omniauth
[
'providers'
].
find
{
|
provider
|
provider
[
"name"
]
==
"github"
}
if
github_settings
if
github_settings
[
"url"
].
include?
(
"https://github.com"
)
# For compatibility with old config files (before 7.8)
# where people dont have url in github settings
if
github_settings
[
'url'
].
blank?
github_settings
[
'url'
]
=
github_default_url
end
if
github_settings
[
"url"
].
include?
(
github_default_url
)
github_settings
[
"args"
][
"client_options"
]
=
{
"site"
=>
'https://api.github.com/'
,
"authorize_url"
=>
'https://github.com/login/oauth/authorize'
,
...
...
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