Commit 7bb84e64 authored by Felipe Artur's avatar Felipe Artur

Change landing page when skipping confirmation email and add documentation

parent 0baadd6c
......@@ -37,8 +37,8 @@ def build_resource(hash=nil)
def after_sign_up_path_for(_resource)
def after_sign_up_path_for(user)
user.confirmed_at.present? ? dashboard_projects_path : users_almost_there_path
def after_inactive_sign_up_path_for(_resource)
......@@ -106,9 +106,9 @@
= f.label :skip_confirmation_email do
= f.label :send_user_confirmation_email do
= f.check_box :send_user_confirmation_email
Send sign-up email confirmation
Send confirmation email on sign-up
......@@ -3,7 +3,7 @@ def up
add_column :application_settings, :send_user_confirmation_email, :boolean, default: false
#Sets confirmation email to true by default on existing installations.
ApplicationSetting.update_all(send_user_confirmation_email: true)
execute "UPDATE application_settings SET send_user_confirmation_email=true"
def down
......@@ -8,3 +8,4 @@
- [User File Uploads](
- [How we manage the CRIME vulnerability](
- [Enforce Two-factor authentication](
- [Send email confirmation on sign-up](
# User email confirmation at sign-up
Gitlab admin can enable email confirmation on sign-up, if you want to confirm all
user emails before they are able to sign-in.
In the Admin area under **Settings** (`/admin/application_settings`), go to section
**Sign-in Restrictions** and look for **Send confirmation email on sign-up** option.
......@@ -16,7 +16,7 @@
it 'logs user in directly' do
post(:create, user_params)
expect(ActionMailer::Base.deliveries.last).to be_nil
expect(subject.current_user).to be
expect(subject.current_user).to_not be_nil
......@@ -2,6 +2,8 @@
feature 'Signup', feature: true do
describe 'signup with no errors' do
context "when sending confirmation email" do
before { allow_any_instance_of(ApplicationSetting).to receive(:send_user_confirmation_email).and_return(true) }
it 'creates the user account and sends a confirmation email' do
......@@ -20,6 +22,27 @@
context "when not sending confirmation email" do
before { allow_any_instance_of(ApplicationSetting).to receive(:send_user_confirmation_email).and_return(false) }
it 'creates the user account and goes to dashboard' do
user = build(:user)
visit root_path
fill_in 'new_user_name', with:
fill_in 'new_user_username', with: user.username
fill_in 'new_user_email', with:
fill_in 'new_user_password', with: user.password
click_button "Sign up"
expect(current_path).to eq dashboard_projects_path
expect(page).to have_content("Welcome! You have signed up successfully.")
describe 'signup with errors' do
it "displays the errors" do
existing_user = create(:user)
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