mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-12 06:06:05 +10:00
fix mass assignment error in create_from_omniauth after a6a229a
This commit is contained in:
+2
-2
@@ -30,7 +30,7 @@ module Gitlab
|
||||
log.info "#{ldap_prefix}Creating user from #{provider} login"\
|
||||
" {uid => #{uid}, name => #{name}, email => #{email}}"
|
||||
password = Devise.friendly_token[0, 8].downcase
|
||||
@user = User.new(
|
||||
@user = User.new({
|
||||
extern_uid: uid,
|
||||
provider: provider,
|
||||
name: name,
|
||||
@@ -38,7 +38,7 @@ module Gitlab
|
||||
password: password,
|
||||
password_confirmation: password,
|
||||
projects_limit: Gitlab.config.default_projects_limit,
|
||||
)
|
||||
}, as: :admin)
|
||||
if Gitlab.config.omniauth['block_auto_created_users'] && !ldap
|
||||
@user.blocked = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user