add email 2FA

This commit is contained in:
Alex Turchyn
2025-12-08 09:32:03 +02:00
committed by Pete Matsyburka
parent 0e0aa0259e
commit 6e43a42274
22 changed files with 432 additions and 57 deletions
+3 -1
View File
@@ -16,7 +16,9 @@ class StartFormController < ApplicationController
COOKIES_DEFAULTS = { httponly: true, secure: Rails.env.production? }.freeze
def show
raise ActionController::RoutingError, I18n.t('not_found') if @template.preferences['require_phone_2fa']
if @template.preferences['require_phone_2fa'] || @template.preferences['require_email_2fa']
raise ActionController::RoutingError, I18n.t('not_found')
end
if @template.shared_link?
@submitter = @template.submissions.new(account_id: @template.account_id)