Commit 882d8bc6 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Merge branch 'nicolasdular/remove-confirmation-email' into 'master'

Remove email confirmation field from signup

See merge request gitlab-org/gitlab!41813
parents 1427fdba ea9c099c
......@@ -152,7 +152,7 @@ class RegistrationsController < Devise::RegistrationsController
end
def sign_up_params
params.require(:user).permit(:username, :email, :email_confirmation, :name, :first_name, :last_name, :password)
params.require(:user).permit(:username, :email, :name, :first_name, :last_name, :password)
end
def resource_name
......
......@@ -91,7 +91,6 @@ module Users
def signup_params
[
:email,
:email_confirmation,
:password_automatically_set,
:name,
:first_name,
......
......@@ -20,9 +20,6 @@
.form-group
= f.label :email, class: 'label-bold'
= f.email_field :email, value: @invite_email, class: "form-control middle", data: { qa_selector: 'new_user_email_field' }, required: true, title: _("Please provide a valid email address.")
.form-group
= f.label :email_confirmation, class: 'label-bold'
= f.email_field :email_confirmation, class: "form-control middle", data: { qa_selector: 'new_user_email_confirmation_field' }, required: true, title: _("Please retype the email address.")
.form-group.append-bottom-20#password-strength
= f.label :password, class: 'label-bold'
= f.password_field :password, class: "form-control bottom", data: { qa_selector: 'new_user_password_field' }, required: true, pattern: ".{#{@minimum_password_length},}", title: _("Minimum length is %{minimum_password_length} characters.") % { minimum_password_length: @minimum_password_length }
......
---
title: Remove email confirmation field on signup form
merge_request: 41813
author:
type: changed
......@@ -41,7 +41,7 @@ Devise.setup do |config|
# Configure which authentication keys should be case-insensitive.
# These keys will be downcased upon creating or modifying a user and when used
# to authenticate or find a user. Default is :email.
config.case_insensitive_keys = [:email, :email_confirmation]
config.case_insensitive_keys = [:email]
# Configure which authentication keys should have whitespace stripped.
# These keys will have whitespace before and after removed upon creating or
......
......@@ -128,7 +128,6 @@ module EE
hash[:saml_provider_id] = @group.saml_provider.id
hash[:group_id] = @group.id
hash[:provider] = identity_provider
hash[:email_confirmation] = hash[:email]
hash[:username] = valid_username
hash[:password] = hash[:password_confirmation] = random_password
hash[:password_automatically_set] = PASSWORD_AUTOMATICALLY_SET
......
......@@ -17,7 +17,6 @@ RSpec.describe 'Signup on EE' do
fill_in 'new_user_name', with: user_attrs[:name]
fill_in 'new_user_username', with: user_attrs[:username]
fill_in 'new_user_email', with: user_attrs[:email]
fill_in 'new_user_email_confirmation', with: user_attrs[:email]
fill_in 'new_user_password', with: user_attrs[:password]
check 'new_user_email_opted_in'
click_button "Register"
......@@ -37,7 +36,6 @@ RSpec.describe 'Signup on EE' do
fill_in 'new_user_name', with: user_attrs[:name]
fill_in 'new_user_username', with: user_attrs[:username]
fill_in 'new_user_email', with: user_attrs[:email]
fill_in 'new_user_email_confirmation', with: user_attrs[:email]
fill_in 'new_user_password', with: user_attrs[:password]
click_button "Register"
......@@ -55,7 +53,6 @@ RSpec.describe 'Signup on EE' do
fill_in 'new_user_name', with: user_attrs[:name].split(' ').first
fill_in 'new_user_username', with: user_attrs[:username]
fill_in 'new_user_email', with: user_attrs[:email]
fill_in 'new_user_email_confirmation', with: user_attrs[:email]
fill_in 'new_user_password', with: user_attrs[:password]
click_button 'Register'
visit new_project_path
......@@ -86,7 +83,6 @@ RSpec.describe 'Signup on EE' do
fill_in 'new_user_name', with: user_attrs[:name]
fill_in 'new_user_username', with: user_attrs[:username]
fill_in 'new_user_email', with: user_attrs[:email]
fill_in 'new_user_email_confirmation', with: user_attrs[:email]
fill_in 'new_user_password', with: user_attrs[:password]
click_button "Register"
......
......@@ -18735,9 +18735,6 @@ msgstr ""
msgid "Please refer to %{docs_url}"
msgstr ""
msgid "Please retype the email address."
msgstr ""
msgid "Please select"
msgstr ""
......
......@@ -8,7 +8,6 @@ module QA
element :new_user_name_field
element :new_user_username_field
element :new_user_email_field
element :new_user_email_confirmation_field
element :new_user_password_field
element :new_user_register_button
element :new_user_accept_terms_checkbox
......@@ -18,7 +17,6 @@ module QA
fill_element :new_user_name_field, user.name
fill_element :new_user_username_field, user.username
fill_element :new_user_email_field, user.email
fill_element :new_user_email_confirmation_field, user.email
fill_element :new_user_password_field, user.password
check_element :new_user_accept_terms_checkbox if has_element?(:new_user_accept_terms_checkbox)
......
......@@ -26,7 +26,6 @@ RSpec.describe 'Invites', :aggregate_failures do
fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_username', with: new_user.username
fill_in 'new_user_email', with: new_user.email
fill_in 'new_user_email_confirmation', with: new_user.email
fill_in 'new_user_password', with: new_user.password
click_button 'Register'
end
......
......@@ -152,7 +152,6 @@ RSpec.shared_examples 'Signup' do
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email
end
fill_in 'new_user_password', with: new_user.password
......@@ -180,7 +179,6 @@ RSpec.shared_examples 'Signup' do
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email
end
fill_in 'new_user_password', with: new_user.password
......@@ -204,7 +202,6 @@ RSpec.shared_examples 'Signup' do
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email.capitalize
end
fill_in 'new_user_password', with: new_user.password
......@@ -230,7 +227,6 @@ RSpec.shared_examples 'Signup' do
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email
end
fill_in 'new_user_password', with: new_user.password
......@@ -260,14 +256,7 @@ RSpec.shared_examples 'Signup' do
click_button "Register"
expect(current_path).to eq user_registration_path
if Gitlab::Experimentation.enabled?(:signup_flow)
expect(page).to have_content("error prohibited this user from being saved")
else
expect(page).to have_content("errors prohibited this user from being saved")
expect(page).to have_content("Email confirmation doesn't match")
end
expect(page).to have_content("error prohibited this user from being saved")
expect(page).to have_content("Email has already been taken")
end
......@@ -309,7 +298,6 @@ RSpec.shared_examples 'Signup' do
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email
end
fill_in 'new_user_password', with: new_user.password
......@@ -331,7 +319,6 @@ RSpec.shared_examples 'Signup' do
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email
end
fill_in 'new_user_password', with: new_user.password
......@@ -374,7 +361,6 @@ RSpec.shared_examples 'Signup' do
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email
end
fill_in 'new_user_password', with: new_user.password
......@@ -396,7 +382,6 @@ RSpec.shared_examples 'Signup' do
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email
end
fill_in 'new_user_password', with: new_user.password
......@@ -419,7 +404,6 @@ RSpec.shared_examples 'Signup' do
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email
end
fill_in 'new_user_password', with: new_user.password
......
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