Update wording for 2FA requirement notice
This commit is contained in:
parent
5409fc49bd
commit
fcab1345da
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue