summaryrefslogtreecommitdiff
path: root/app/helpers/auth_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/auth_helper.rb')
-rw-r--r--app/helpers/auth_helper.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb
index 1ee6c1d3afa..9c71d6c7f4c 100644
--- a/app/helpers/auth_helper.rb
+++ b/app/helpers/auth_helper.rb
@@ -64,16 +64,8 @@ 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
+ def unlink_allowed?(provider)
+ %w(saml cas3).exclude?(provider.to_s)
end
extend self