summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2012-09-26 11:06:31 -0700
committerNihad Abbasov <narkoz.2008@gmail.com>2012-09-26 11:18:25 -0700
commit4629cc44d6b7fa7ebdec8ce47bb0825e255d7763 (patch)
treef6f520b4f4aae69602ff6352aee9f63685913e22
parentdddb5b5de99e54d31c9ac3bff82210adf3fa7069 (diff)
downloadgitlab-ce-4629cc44d6b7fa7ebdec8ce47bb0825e255d7763.tar.gz
fix mass assignment error in create_from_omniauth after a6a229a
-rw-r--r--lib/gitlab/auth.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb
index 90bd5d74081..500cb64df48 100644
--- a/lib/gitlab/auth.rb
+++ b/lib/gitlab/auth.rb
@@ -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