diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml index eb0e6701627..35dafb3e980 100644 --- a/app/views/devise/passwords/edit.html.haml +++ b/app/views/devise/passwords/edit.html.haml @@ -1,7 +1,7 @@ = render 'devise/shared/tab_single', tab_title:'Change your password' .login-box .login-body - = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: 'gl-show-field-errors' }) do |f| + = form_for(resource, as: resource_name, url: password_path(:user), html: { method: :put, class: 'gl-show-field-errors' }) do |f| .devise-errors = devise_error_messages! = f.hidden_field :reset_password_token @@ -17,5 +17,5 @@ .clearfix.prepend-top-20 %p %span.light Didn't receive a confirmation email? - = link_to "Request a new one", new_confirmation_path(resource_name) + = link_to "Request a new one", new_confirmation_path(:user) = render 'devise/shared/sign_in_link' diff --git a/app/views/devise/sessions/_new_base.html.haml b/app/views/devise/sessions/_new_base.html.haml index 4095f30c369..41462f503cb 100644 --- a/app/views/devise/sessions/_new_base.html.haml +++ b/app/views/devise/sessions/_new_base.html.haml @@ -11,6 +11,6 @@ = f.check_box :remember_me, class: 'remember-me-checkbox' %span Remember me .pull-right.forgot-password - = link_to "Forgot your password?", new_password_path(resource_name) + = link_to "Forgot your password?", new_password_path(:user) .submit-container.move-submit-down = f.submit "Sign in", class: "btn btn-save" diff --git a/app/views/devise/shared/_links.erb b/app/views/devise/shared/_links.erb index 6e1cc244f26..cb934434c28 100644 --- a/app/views/devise/shared/_links.erb +++ b/app/views/devise/shared/_links.erb @@ -1,19 +1,19 @@ <%- if controller_name != 'sessions' %> - <%= link_to "Sign in", new_session_path(resource_name), class: "btn" %>
+ <%= link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: "btn" %>
<% end -%> <%- if devise_mapping.registerable? && controller_name != 'registrations' && allow_signup? %> - <%= link_to "Sign up", new_registration_path(resource_name) %>
+ <%= link_to "Sign up", new_registration_path(:user) %>
<% end -%> <%- if devise_mapping.recoverable? && controller_name != 'passwords' %> -<%= link_to "Forgot your password?", new_password_path(resource_name), class: "btn" %>
+<%= link_to "Forgot your password?", new_password_path(:user), class: "btn" %>
<% end -%> <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> - <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(:user) %>
<% end -%> <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> - <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(:user) %>
<% end -%> diff --git a/app/views/devise/shared/_sign_in_link.html.haml b/app/views/devise/shared/_sign_in_link.html.haml index 289bf40f3de..77ef103cc47 100644 --- a/app/views/devise/shared/_sign_in_link.html.haml +++ b/app/views/devise/shared/_sign_in_link.html.haml @@ -1,4 +1,4 @@ %p %span.light Already have login and password? - = link_to "Sign in", new_session_path(resource_name) + = link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes') diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml index 298604dee8c..2554b2688bb 100644 --- a/app/views/devise/shared/_signup_box.html.haml +++ b/app/views/devise/shared/_signup_box.html.haml @@ -31,4 +31,4 @@ %p %span.light Didn't receive a confirmation email? = succeed '.' do - = link_to "Request a new one", new_confirmation_path(resource_name) + = link_to "Request a new one", new_confirmation_path(:user) diff --git a/app/views/errors/omniauth_error.html.haml b/app/views/errors/omniauth_error.html.haml index 20b7fa471a0..a2a4c75daad 100644 --- a/app/views/errors/omniauth_error.html.haml +++ b/app/views/errors/omniauth_error.html.haml @@ -9,7 +9,7 @@ %p Try logging in using your username or email. If you have forgotten your password, try recovering it = link_to "Sign in", new_session_path(:user), class: 'btn primary' - = link_to "Recover password", new_password_path(resource_name), class: 'btn secondary' + = link_to "Recover password", new_password_path(:user), class: 'btn secondary' %hr %p.light If none of the options work, try contacting a GitLab administrator. diff --git a/changelogs/unreleased/39367-fix-new-email-session-path.yml b/changelogs/unreleased/39367-fix-new-email-session-path.yml new file mode 100644 index 00000000000..73485d9d1a9 --- /dev/null +++ b/changelogs/unreleased/39367-fix-new-email-session-path.yml @@ -0,0 +1,5 @@ +--- +title: Confirming email with invalid token should no longer generate an error +merge_request: 15726 +author: +type: fixed