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
diff options
context:
space:
mode:
authorRoger Rüttimann <roger.ruettimann@gmail.com>2018-06-25 18:32:03 +0300
committerDouwe Maan <douwe@gitlab.com>2018-06-25 18:32:03 +0300
commit2efe27ba181daa18db9e227b13be428ebdfc23f1 (patch)
treeeea8a62ad5159b63cec5e367f4be49bfd09aec97 /lib/gitlab/auth/saml/user.rb
parent77fe416681a553005f9ec769113555830c8fb07c (diff)
Honor saml assurance level to allow 2FA bypassing
Diffstat (limited to 'lib/gitlab/auth/saml/user.rb')
-rw-r--r--lib/gitlab/auth/saml/user.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/auth/saml/user.rb b/lib/gitlab/auth/saml/user.rb
index b8c84c37cd5..6c3b75f3eb0 100644
--- a/lib/gitlab/auth/saml/user.rb
+++ b/lib/gitlab/auth/saml/user.rb
@@ -34,6 +34,10 @@ module Gitlab
gl_user.changed? || gl_user.identities.any?(&:changed?)
end
+ def bypass_two_factor?
+ saml_config.upstream_two_factor_authn_contexts&.include?(auth_hash.authn_context)
+ end
+
protected
def saml_config