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
a5c35cfc
Commit
a5c35cfc
authored
May 27, 2020
by
Jan Beckmann
Committed by
Paul Slaughter
Jun 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consolidate admin u2f authenticate with normal u2f authenticate
parent
9f8a66d0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
22 deletions
+6
-22
app/views/admin/sessions/_two_factor_u2f.html.haml
app/views/admin/sessions/_two_factor_u2f.html.haml
+0
-17
app/views/admin/sessions/two_factor.html.haml
app/views/admin/sessions/two_factor.html.haml
+1
-1
app/views/devise/sessions/two_factor.html.haml
app/views/devise/sessions/two_factor.html.haml
+1
-1
app/views/u2f/_authenticate.html.haml
app/views/u2f/_authenticate.html.haml
+4
-3
No files found.
app/views/admin/sessions/_two_factor_u2f.html.haml
deleted
100644 → 0
View file @
9f8a66d0
#js-authenticate-u2f
%a
.btn.btn-block.btn-info
#js-login-2fa-device
{
href:
'#'
}=
_
(
"Sign in via 2FA code"
)
%script
#js-authenticate-u2f-in-progress
{
type:
"text/template"
}
%p
=
_
(
"Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now."
)
-# haml-lint:disable NoPlainNodes
%script
#js-authenticate-u2f-error
{
type:
"text/template"
}
%div
%p
<
%=
error_message
%
>
(
#{
_
(
"error code:"
)
}
<
%=
error_code
%
>
)
%a
.btn.btn-block.btn-warning
#js-u2f-try-again
=
_
(
"Try again?"
)
%script
#js-authenticate-u2f-authenticated
{
type:
"text/template"
}
%div
%p
=
_
(
"We heard back from your U2F device. You have been authenticated."
)
=
form_tag
(
admin_session_path
,
method: :post
,
id:
'js-login-u2f-form'
)
do
|
f
|
=
hidden_field_tag
'user[device_response]'
,
nil
,
class:
'form-control'
,
required:
true
,
id:
"js-device-response"
app/views/admin/sessions/two_factor.html.haml
View file @
a5c35cfc
...
...
@@ -12,4 +12,4 @@
-
if
current_user
.
two_factor_otp_enabled?
=
render
'admin/sessions/two_factor_otp'
-
if
current_user
.
two_factor_u2f_enabled?
=
render
'
admin/sessions/two_factor_u2f'
=
render
'
u2f/authenticate'
,
render_remember_me:
false
,
target_path:
admin_session_path
app/views/devise/sessions/two_factor.html.haml
View file @
a5c35cfc
...
...
@@ -14,4 +14,4 @@
=
f
.
submit
"Verify code"
,
class:
"btn btn-success"
-
if
@user
.
two_factor_u2f_enabled?
=
render
"u2f/authenticate"
,
locals:
{
params:
params
,
resource:
resource
,
resource_name:
resource_name
}
=
render
"u2f/authenticate"
,
params:
params
,
resource:
resource
,
resource_name:
resource_name
,
render_remember_me:
true
,
target_path:
new_user_session_path
app/views/u2f/_authenticate.html.haml
View file @
a5c35cfc
...
...
@@ -12,7 +12,8 @@
%script
#js-authenticate-u2f-authenticated
{
type:
"text/template"
}
%div
%p
=
_
(
"We heard back from your U2F device. You have been authenticated."
)
=
form_tag
(
new_user_session_path
,
method: :post
,
id:
'js-login-u2f-form'
)
do
|
f
|
-
resource_params
=
params
[
resource_name
].
presence
||
params
=
hidden_field_tag
'user[remember_me]'
,
resource_params
.
fetch
(
:remember_me
,
0
)
=
form_tag
(
target_path
,
method: :post
,
id:
'js-login-u2f-form'
)
do
|
f
|
-
if
render_remember_me
-
resource_params
=
params
[
resource_name
].
presence
||
params
=
hidden_field_tag
'user[remember_me]'
,
resource_params
.
fetch
(
:remember_me
,
0
)
=
hidden_field_tag
'user[device_response]'
,
nil
,
class:
'form-control'
,
required:
true
,
id:
"js-device-response"
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