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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
12581f15
Commit
12581f15
authored
Mar 02, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7473 from sodabrew/patch-1
Improve login screen when only OmniAuth providers are enabled
parents
e39bf837
252ee4e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
18 deletions
+24
-18
app/views/devise/sessions/new.html.haml
app/views/devise/sessions/new.html.haml
+14
-2
app/views/devise/shared/_omniauth_box.html.haml
app/views/devise/shared/_omniauth_box.html.haml
+10
-0
app/views/devise/shared/_signin_box.html.haml
app/views/devise/shared/_signin_box.html.haml
+0
-16
No files found.
app/views/devise/sessions/new.html.haml
View file @
12581f15
%div
=
render
'devise/shared/signin_box'
-
if
signin_enabled?
||
ldap_enabled?
=
render
'devise/shared/signin_box'
-
if
signup_enabled?
-# Omniauth fits between signin/ldap signin and signup and does not have a surrounding box
-
if
Gitlab
.
config
.
omniauth
.
enabled
&&
devise_mapping
.
omniauthable?
.clearfix.prepend-top-20
=
render
'devise/shared/omniauth_box'
-# Signup only makes sense if you can also sign-in
-
if
signin_enabled?
&&
signup_enabled?
.prepend-top-20
=
render
'devise/shared/signup_box'
-# Show a message if none of the mechanisms above are enabled
-
if
!
signin_enabled?
&&
!
ldap_enabled?
&&
!
(
Gitlab
.
config
.
omniauth
.
enabled
&&
devise_mapping
.
omniauthable?
)
%div
No authentication methods configured.
app/views/devise/shared/_omniauth_box.html.haml
0 → 100644
View file @
12581f15
%p
%span
.light
Sign in with
-
providers
=
additional_providers
-
providers
.
each
do
|
provider
|
%span
.light
-
if
default_providers
.
include?
(
provider
)
=
link_to
authbutton
(
provider
,
32
),
omniauth_authorize_path
(
resource_name
,
provider
)
-
else
=
link_to
provider
.
to_s
.
titleize
,
omniauth_authorize_path
(
resource_name
,
provider
),
class:
"btn"
app/views/devise/shared/_signin_box.html.haml
View file @
12581f15
...
...
@@ -24,19 +24,3 @@
-
elsif
signin_enabled?
=
render
'devise/sessions/new_base'
-
else
%div
No authentication methods configured.
-
if
Gitlab
.
config
.
omniauth
.
enabled
&&
devise_mapping
.
omniauthable?
.clearfix.prepend-top-20
%p
%span
.light
Sign in with
-
providers
=
additional_providers
-
providers
.
each
do
|
provider
|
%span
.light
-
if
default_providers
.
include?
(
provider
)
=
link_to
authbutton
(
provider
,
32
),
omniauth_authorize_path
(
resource_name
,
provider
)
-
else
=
link_to
provider
.
to_s
.
titleize
,
omniauth_authorize_path
(
resource_name
,
provider
),
class:
"btn"
\ 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