Commit e02e0ecf authored by Aishwarya Subramanian's avatar Aishwarya Subramanian

Do not auto-confirm email on Trial registration

This MR prevents email addresses from being confirmed
automatically for Trial registrations.
parent 762fd872
......@@ -9,7 +9,6 @@ class TrialRegistrationsController < RegistrationsController
before_action :check_if_gl_com
before_action :set_redirect_url, only: [:new]
before_action :skip_confirmation, only: [:create]
def new
end
......@@ -26,10 +25,6 @@ class TrialRegistrationsController < RegistrationsController
end
end
def skip_confirmation
params[:user][:skip_confirmation] = true
end
override :sign_up_params
def sign_up_params
if params[:user]
......
---
title: Do not auto-confirm email in Trial registration
merge_request:
author:
type: security
......@@ -71,10 +71,10 @@ describe TrialRegistrationsController do
allow(Gitlab).to receive(:com?).and_return(true)
end
it 'marks the account as confirmed' do
it 'marks the account as unconfirmed' do
post :create, params: { user: user_params }
expect(User.last).to be_confirmed
expect(User.last).not_to be_confirmed
end
context 'derivation of name' do
......
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