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
fcab1345
Commit
fcab1345
authored
Jan 23, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update wording for 2FA requirement notice
parent
5409fc49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
two_factor_auths_controller.rb
app/controllers/profiles/two_factor_auths_controller.rb
+2
-2
login_spec.rb
spec/features/login_spec.rb
+5
-5
No files found.
app/controllers/profiles/two_factor_auths_controller.rb
View file @
fcab1345
...
...
@@ -13,10 +13,10 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
current_user
.
save!
if
current_user
.
changed?
if
two_factor_grace_period_expired?
flash
.
now
[
:alert
]
=
'You must
configure Two-Factor Authentication in
your account.'
flash
.
now
[
:alert
]
=
'You must
enable Two-factor Authentication for
your account.'
else
grace_period_deadline
=
current_user
.
otp_grace_period_started_at
+
two_factor_grace_period
.
hours
flash
.
now
[
:alert
]
=
"You must
configure Two-Factor Authentication in your account until
#{
l
(
grace_period_deadline
)
}
."
flash
.
now
[
:alert
]
=
"You must
enable Two-factor Authentication for your account before
#{
l
(
grace_period_deadline
)
}
."
end
@qr_code
=
build_qr_code
...
...
spec/features/login_spec.rb
View file @
fcab1345
...
...
@@ -112,10 +112,10 @@ feature 'Login', feature: true do
context
'within the grace period'
do
it
'redirects to two-factor configuration page'
do
expect
(
current_path
).
to
eq
new_profile_two_factor_auth_path
expect
(
page
).
to
have_content
(
'You must
configure Two-Factor Authentication in your account until
'
)
expect
(
page
).
to
have_content
(
'You must
enable Two-factor Authentication for your account before
'
)
end
it
'
two-factor configuration is skippable
'
do
it
'
disallows skipping two-factor configuration
'
do
expect
(
current_path
).
to
eq
new_profile_two_factor_auth_path
click_link
'Configure it later'
...
...
@@ -128,10 +128,10 @@ feature 'Login', feature: true do
it
'redirects to two-factor configuration page'
do
expect
(
current_path
).
to
eq
new_profile_two_factor_auth_path
expect
(
page
).
to
have_content
(
'You must
configure Two-Factor Authentication in
your account.'
)
expect
(
page
).
to
have_content
(
'You must
enable Two-factor Authentication for
your account.'
)
end
it
'
two-factor configuration is not skippable
'
do
it
'
disallows skipping two-factor configuration
'
do
expect
(
current_path
).
to
eq
new_profile_two_factor_auth_path
expect
(
page
).
not_to
have_link
(
'Configure it later'
)
end
...
...
@@ -146,7 +146,7 @@ feature 'Login', feature: true do
it
'redirects to two-factor configuration page'
do
expect
(
current_path
).
to
eq
new_profile_two_factor_auth_path
expect
(
page
).
to
have_content
(
'You must
configure Two-Factor Authentication in
your account.'
)
expect
(
page
).
to
have_content
(
'You must
enable Two-factor Authentication for
your account.'
)
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