Commit 4629cc44 authored by Nihad Abbasov's avatar Nihad Abbasov

fix mass assignment error in create_from_omniauth after a6a229a

parent dddb5b5d
...@@ -30,7 +30,7 @@ module Gitlab ...@@ -30,7 +30,7 @@ module Gitlab
log.info "#{ldap_prefix}Creating user from #{provider} login"\ log.info "#{ldap_prefix}Creating user from #{provider} login"\
" {uid => #{uid}, name => #{name}, email => #{email}}" " {uid => #{uid}, name => #{name}, email => #{email}}"
password = Devise.friendly_token[0, 8].downcase password = Devise.friendly_token[0, 8].downcase
@user = User.new( @user = User.new({
extern_uid: uid, extern_uid: uid,
provider: provider, provider: provider,
name: name, name: name,
...@@ -38,7 +38,7 @@ module Gitlab ...@@ -38,7 +38,7 @@ module Gitlab
password: password, password: password,
password_confirmation: password, password_confirmation: password,
projects_limit: Gitlab.config.default_projects_limit, projects_limit: Gitlab.config.default_projects_limit,
) }, as: :admin)
if Gitlab.config.omniauth['block_auto_created_users'] && !ldap if Gitlab.config.omniauth['block_auto_created_users'] && !ldap
@user.blocked = true @user.blocked = true
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