Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordodocat <jingqq5210@gmail.com>2019-08-27 06:46:32 +0300
committerMichael Kozono <mkozono@gmail.com>2019-08-27 06:46:32 +0300
commit6e2032f24e0428189f8c9fe9e296a9630277155e (patch)
tree79ed8e273c4ee80512a11ca1029cd20426625457 /lib
parent5e59c919d780441a5605d76e76ce63a69166464d (diff)
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.rb7
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