diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-02-19 01:02:43 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-02-19 01:02:43 +0300 |
commit | bb4fa3a185d6cf0e2fbd5d11917ba5bcdbf92926 (patch) | |
tree | ff71d4ba9a9e0ced72d77c81d44739d61d839903 /lib/gitlab/o_auth | |
parent | 06376be56a84b43976b63aad91638fb2c00fec1a (diff) |
Make new `allow_single_sign_on` feature backwards compatible
Diffstat (limited to 'lib/gitlab/o_auth')
-rw-r--r-- | lib/gitlab/o_auth/user.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb index 675ded92a89..832fb08a526 100644 --- a/lib/gitlab/o_auth/user.rb +++ b/lib/gitlab/o_auth/user.rb @@ -106,7 +106,11 @@ module Gitlab def signup_enabled? providers = Gitlab.config.omniauth.allow_single_sign_on - providers.include?(auth_hash.provider) + if providers.is_a?(Array) + providers.include?(auth_hash.provider) + else + providers + end end def block_after_signup? |