Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
d30ed1ed8092
Commit
401dc5ae
authored
Mar 01, 2018
by
Francisco Javier López
Committed by
Douwe Maan
Mar 01, 2018
Browse files
Removing the two factor check when the user sets a new password
parent
fb4445a44a66
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/controllers/profiles/passwords_controller.rb
View file @
d30ed1ed
class
Profiles::PasswordsController
<
Profiles
::
ApplicationController
skip_before_action
:check_password_expiration
,
only:
[
:new
,
:create
]
skip_before_action
:check_two_factor_requirement
,
only:
[
:new
,
:create
]
before_action
:set_user
before_action
:authorize_change_password!
...
...
changelogs/unreleased/fj-28141-redirection-loop.yml
0 → 100644
View file @
d30ed1ed
---
title
:
Removing the two factor check when the user sets a new password
merge_request
:
17457
author
:
type
:
fixed
spec/features/profiles/password_spec.rb
View file @
d30ed1ed
...
...
@@ -134,5 +134,15 @@ def fill_passwords(password, confirmation)
expect
(
current_path
).
to
eq
new_user_session_path
end
context
'when global require_two_factor_authentication is enabled'
do
it
'needs change user password'
do
stub_application_setting
(
require_two_factor_authentication:
true
)
visit
profile_path
expect
(
current_path
).
to
eq
new_profile_password_path
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