Skip to content
Snippets Groups Projects
Commit 2e8b0fa5 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Oauth users and users created by admin should be confirmed immediatly

parent 6fff92e9
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -47,6 +47,7 @@ class Admin::UsersController < Admin::ApplicationController
@user = User.build_user(params[:user].merge(opts), as: :admin)
@user.admin = (admin && admin.to_i > 0)
@user.created_by_id = current_user.id
@user.confirm!
 
respond_to do |format|
if @user.save
Loading
Loading
Loading
Loading
@@ -29,6 +29,7 @@ module Gitlab
 
user = model.build_user(opts, as: :admin)
user.save!
user.confirm!
log.info "(OAuth) Creating user #{email} from login with extern_uid => #{uid}"
 
if Gitlab.config.omniauth['block_auto_created_users'] && !ldap?
Loading
Loading
Loading
Loading
@@ -23,6 +23,10 @@ FactoryGirl.define do
end
 
factory :admin, traits: [:admin]
after :create do |u|
u.confirm!
end
end
 
factory :project do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment