summaryrefslogtreecommitdiff
path: root/app/helpers/auth_helper.rb
diff options
context:
space:
mode:
authorMarkus Koller <markus-koller@gmx.ch>2017-01-24 21:42:15 +0100
committerAlexis Reigel <mail@koffeinfrei.org>2017-04-06 10:01:13 +0200
commit57374feabe1428b2ea06a6a3cac244612128095d (patch)
treeee06e37ef946dddcaba840a2446dc2e11bdf0406 /app/helpers/auth_helper.rb
parentaaa49c2c4e9473726814e3ce183c2e3e4072d64b (diff)
downloadgitlab-ce-57374feabe1428b2ea06a6a3cac244612128095d.tar.gz
Move AuthHelper#two_factor_skippable? into ApplicationController
Diffstat (limited to 'app/helpers/auth_helper.rb')
-rw-r--r--app/helpers/auth_helper.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb
index 101fe579da2..9c71d6c7f4c 100644
--- a/app/helpers/auth_helper.rb
+++ b/app/helpers/auth_helper.rb
@@ -64,18 +64,6 @@ module AuthHelper
current_user.identities.exists?(provider: provider.to_s)
end
- def two_factor_skippable?
- current_application_settings.require_two_factor_authentication &&
- !current_user.two_factor_enabled? &&
- current_application_settings.two_factor_grace_period &&
- !two_factor_grace_period_expired?
- end
-
- def two_factor_grace_period_expired?
- current_user.otp_grace_period_started_at &&
- (current_user.otp_grace_period_started_at + current_application_settings.two_factor_grace_period.hours) < Time.current
- end
-
def unlink_allowed?(provider)
%w(saml cas3).exclude?(provider.to_s)
end