Change ability to navigate of unconfirmed users (#33209)
This commit is contained in:
parent
ca45f896dd
commit
796dd57e1b
6 changed files with 21 additions and 19 deletions
|
@ -70,7 +70,13 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def require_functional!
|
||||
redirect_to edit_user_registration_path unless current_user.functional?
|
||||
return if current_user.functional?
|
||||
|
||||
if current_user.confirmed?
|
||||
redirect_to edit_user_registration_path
|
||||
else
|
||||
redirect_to auth_setup_path
|
||||
end
|
||||
end
|
||||
|
||||
def skip_csrf_meta_tags?
|
||||
|
|
|
@ -78,5 +78,3 @@
|
|||
|
||||
.actions
|
||||
= f.button :button, @invite.present? ? t('auth.register') : sign_up_message, type: :submit
|
||||
|
||||
.form-footer= render 'auth/shared/links'
|
||||
|
|
|
@ -27,5 +27,3 @@
|
|||
- accept_path = @invite_code.present? ? public_invite_url(invite_code: @invite_code, accept: @accept_token) : new_user_registration_path(accept: @accept_token)
|
||||
= link_to t('auth.rules.accept'), accept_path, class: 'button'
|
||||
= link_to t('auth.rules.back'), root_path, class: 'button button-tertiary'
|
||||
|
||||
.form-footer= render 'auth/shared/links'
|
||||
|
|
|
@ -11,17 +11,17 @@
|
|||
|
||||
= render 'shared/error_messages', object: @user
|
||||
|
||||
%p.lead
|
||||
%strong= t('auth.setup.link_not_received')
|
||||
%p.lead= t('auth.setup.email_below_hint_html')
|
||||
%details
|
||||
%summary.lead
|
||||
%strong= t('auth.setup.link_not_received')
|
||||
|
||||
.fields-group
|
||||
= f.input :email,
|
||||
hint: false,
|
||||
input_html: { 'aria-label': t('simple_form.labels.defaults.email'), autocomplete: 'off' },
|
||||
required: true
|
||||
%p.lead= t('auth.setup.email_below_hint_html')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('auth.resend_confirmation'), type: :submit, class: 'button timer-button', disabled: true
|
||||
.fields-group
|
||||
= f.input :email,
|
||||
hint: false,
|
||||
input_html: { 'aria-label': t('simple_form.labels.defaults.email'), autocomplete: 'off', placeholder: t('simple_form.labels.defaults.email') },
|
||||
required: true
|
||||
|
||||
.form-footer= render 'auth/shared/links'
|
||||
.actions
|
||||
= f.button :button, t('auth.resend_confirmation'), type: :submit, class: 'button timer-button', disabled: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue