summaryrefslogtreecommitdiff
path: root/lib/gitlab/o_auth/user.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-02-18 22:14:53 +0100
committerDouwe Maan <douwe@selenight.nl>2016-02-18 22:14:53 +0100
commit873b0db220b92008ed833f0909ecab8861bf00e8 (patch)
treeb84cb7114af9a4f5c30a8e19342a32e7ec18e42b /lib/gitlab/o_auth/user.rb
parent6524fbeaba7c16ae8ca514c7540a1aa6e86f4129 (diff)
downloadgitlab-ce-873b0db220b92008ed833f0909ecab8861bf00e8.tar.gz
Revert "Merge branch 'saml-decoupling' into 'master' "
This reverts commit c04e22fba8d130a58f498ff48127712d7dae17ee, reversing changes made to 0feab326d52222dc0ab5bd0a6b15dab297f44aa9.
Diffstat (limited to 'lib/gitlab/o_auth/user.rb')
-rw-r--r--lib/gitlab/o_auth/user.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb
index 675ded92a89..d87a72f7ba3 100644
--- a/lib/gitlab/o_auth/user.rb
+++ b/lib/gitlab/o_auth/user.rb
@@ -26,7 +26,7 @@ module Gitlab
gl_user.try(:valid?)
end
- def save(provider = 'OAuth')
+ def save
unauthorized_to_create unless gl_user
if needs_blocking?
@@ -36,10 +36,10 @@ module Gitlab
gl_user.save!
end
- log.info "(#{provider}) saving user #{auth_hash.email} from login with extern_uid => #{auth_hash.uid}"
+ log.info "(OAuth) saving user #{auth_hash.email} from login with extern_uid => #{auth_hash.uid}"
gl_user
rescue ActiveRecord::RecordInvalid => e
- log.info "(#{provider}) Error saving user: #{gl_user.errors.full_messages}"
+ log.info "(OAuth) Error saving user: #{gl_user.errors.full_messages}"
return self, e.record.errors
end
@@ -105,8 +105,7 @@ module Gitlab
end
def signup_enabled?
- providers = Gitlab.config.omniauth.allow_single_sign_on
- providers.include?(auth_hash.provider)
+ Gitlab.config.omniauth.allow_single_sign_on
end
def block_after_signup?