mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-06 01:41:08 +00:00
feat: redirect to two factor methods index after disabling 2FA
Co-authored-by: Santiago Rodriguez <santiago.rodriguez@cedarcode.com>
This commit is contained in:
parent
922701e90f
commit
d6151cfd56
|
@ -16,7 +16,7 @@ module Settings
|
||||||
current_user.disable_two_factor!
|
current_user.disable_two_factor!
|
||||||
UserMailer.two_factor_disabled(current_user).deliver_later!
|
UserMailer.two_factor_disabled(current_user).deliver_later!
|
||||||
|
|
||||||
redirect_to settings_otp_authentication_path, flash: { notice: I18n.t('two_factor_authentication.disabled_success') }
|
redirect_to settings_two_factor_authentication_methods_path, flash: { notice: I18n.t('two_factor_authentication.disabled_success') }
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('settings.two_factor_authentication')
|
= t('settings.two_factor_authentication')
|
||||||
|
|
||||||
|
- if current_user.two_factor_enabled?
|
||||||
- content_for :heading_actions do
|
- content_for :heading_actions do
|
||||||
= link_to t('two_factor_authentication.disable'), disable_settings_two_factor_authentication_methods_path, class: 'button button--destructive', method: :post
|
= link_to t('two_factor_authentication.disable'), disable_settings_two_factor_authentication_methods_path, class: 'button button--destructive', method: :post
|
||||||
|
|
||||||
- if current_user.two_factor_enabled?
|
|
||||||
%p.hint
|
%p.hint
|
||||||
%span.positive-hint
|
%span.positive-hint
|
||||||
= material_symbol 'check'
|
= material_symbol 'check'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user