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
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
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
Gitlab
module
OAuth
module
OAuth
class
Provider
class
Provider
LABELS
=
{
"github"
=>
"GitHub"
,
"gitlab"
=>
"GitLab.com"
,
"google_oauth2"
=>
"Google"
}.
freeze
def
self
.
providers
def
self
.
providers
Devise
.
omniauth_providers
Devise
.
omniauth_providers
end
end
...
@@ -23,8 +29,9 @@ module Gitlab
...
@@ -23,8 +29,9 @@ module Gitlab
end
end
def
self
.
label_for
(
name
)
def
self
.
label_for
(
name
)
name
=
name
.
to_s
config
=
config_for
(
name
)
config
=
config_for
(
name
)
(
config
&&
config
[
'label'
])
||
name
.
to_s
.
titleize
(
config
&&
config
[
'label'
])
||
LABELS
[
name
]
||
name
.
titleize
end
end
end
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