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
98dcad27
Commit
98dcad27
authored
Nov 03, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use proper labels for OAuth providers
parent
4773d98e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
lib/gitlab/o_auth/provider.rb
lib/gitlab/o_auth/provider.rb
+8
-1
No files found.
lib/gitlab/o_auth/provider.rb
View file @
98dcad27
module
Gitlab
module
OAuth
class
Provider
LABELS
=
{
"github"
=>
"GitHub"
,
"gitlab"
=>
"GitLab.com"
,
"google_oauth2"
=>
"Google"
}.
freeze
def
self
.
providers
Devise
.
omniauth_providers
end
...
...
@@ -23,8 +29,9 @@ module Gitlab
end
def
self
.
label_for
(
name
)
name
=
name
.
to_s
config
=
config_for
(
name
)
(
config
&&
config
[
'label'
])
||
name
.
to_s
.
titleize
(
config
&&
config
[
'label'
])
||
LABELS
[
name
]
||
name
.
titleize
end
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