Commit 6052d023 authored by Dan Jensen's avatar Dan Jensen Committed by Adam Hegyi

Expand the Devise unconfirmed message

Previously the Devise error message that was displayed to users with
un-confirmed email addresses was so brief that it confused users. This
expands the message to explain what the user should do next.
parent e81a28b3
---
title: Improve error message when unconfirmed user tries to log in
merge_request: 34818
author:
type: changed
...@@ -15,7 +15,7 @@ en: ...@@ -15,7 +15,7 @@ en:
not_found_in_database: "Invalid %{authentication_keys} or password." not_found_in_database: "Invalid %{authentication_keys} or password."
timeout: "Your session expired. Please sign in again to continue." timeout: "Your session expired. Please sign in again to continue."
unauthenticated: "You need to sign in or sign up before continuing." unauthenticated: "You need to sign in or sign up before continuing."
unconfirmed: "You have to confirm your email address before continuing." unconfirmed: "You have to confirm your email address before continuing. Please check your email for the link we sent you, or click 'Resend confirmation email'."
mailer: mailer:
confirmation_instructions: confirmation_instructions:
subject: "Confirmation instructions" subject: "Confirmation instructions"
......
...@@ -163,7 +163,7 @@ RSpec.describe Groups::GroupMembersController do ...@@ -163,7 +163,7 @@ RSpec.describe Groups::GroupMembersController do
post :request_access, params: { group_id: group } post :request_access, params: { group_id: group }
expect(response).to redirect_to(new_user_session_path) expect(response).to redirect_to(new_user_session_path)
expect(response).to set_flash.to 'You have to confirm your email address before continuing.' expect(response).to set_flash.to I18n.t('devise.failure.unconfirmed')
expect(group.requesters.exists?(user_id: requesting_user)).to be_falsey expect(group.requesters.exists?(user_id: requesting_user)).to be_falsey
expect(group.users).not_to include requesting_user expect(group.users).not_to include requesting_user
end end
......
...@@ -110,7 +110,7 @@ RSpec.describe 'Login' do ...@@ -110,7 +110,7 @@ RSpec.describe 'Login' do
gitlab_sign_in(user) gitlab_sign_in(user)
expect(page).not_to have_content('You have to confirm your email address before continuing.') expect(page).not_to have_content(I18n.t('devise.failure.unconfirmed'))
expect(page).not_to have_link('Resend confirmation email', href: new_user_confirmation_path) expect(page).not_to have_link('Resend confirmation email', href: new_user_confirmation_path)
end end
end end
...@@ -124,7 +124,7 @@ RSpec.describe 'Login' do ...@@ -124,7 +124,7 @@ RSpec.describe 'Login' do
gitlab_sign_in(user) gitlab_sign_in(user)
expect(page).to have_content('You have to confirm your email address before continuing.') expect(page).to have_content(I18n.t('devise.failure.unconfirmed'))
expect(page).to have_link('Resend confirmation email', href: new_user_confirmation_path) expect(page).to have_link('Resend confirmation email', href: new_user_confirmation_path)
end end
end end
...@@ -820,7 +820,7 @@ RSpec.describe 'Login' do ...@@ -820,7 +820,7 @@ RSpec.describe 'Login' do
gitlab_sign_in(user) gitlab_sign_in(user)
expect(current_path).to eq new_user_session_path expect(current_path).to eq new_user_session_path
expect(page).to have_content('You have to confirm your email address before continuing.') expect(page).to have_content(I18n.t('devise.failure.unconfirmed'))
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment