diff options
author | dodocat <jingqq5210@gmail.com> | 2019-08-27 03:46:32 +0000 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2019-08-27 03:46:32 +0000 |
commit | 6e2032f24e0428189f8c9fe9e296a9630277155e (patch) | |
tree | 79ed8e273c4ee80512a11ca1029cd20426625457 /lib | |
parent | 5e59c919d780441a5605d76e76ce63a69166464d (diff) | |
download | gitlab-ce-6e2032f24e0428189f8c9fe9e296a9630277155e.tar.gz |
Update docs and comments about saml with allow_bypass_two_factor
allow_bypass_two_factor configration dose not work with saml provider
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/auth/o_auth/user.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab/auth/o_auth/user.rb b/lib/gitlab/auth/o_auth/user.rb index 09d1d79fefc..f121dce4cbb 100644 --- a/lib/gitlab/auth/o_auth/user.rb +++ b/lib/gitlab/auth/o_auth/user.rb @@ -77,7 +77,12 @@ module Gitlab end def bypass_two_factor? - false + providers = Gitlab.config.omniauth.allow_bypass_two_factor + if providers.is_a?(Array) + providers.include?(auth_hash.provider) + else + providers + end end protected |