diff --git a/app/controllers/newflow/login_controller.rb b/app/controllers/newflow/login_controller.rb index 918bd6738..bb3dcbb6f 100644 --- a/app/controllers/newflow/login_controller.rb +++ b/app/controllers/newflow/login_controller.rb @@ -12,6 +12,7 @@ class LoginController < BaseController before_action :known_signup_role_redirect, only: :login_form before_action :cache_alternate_signup_url, only: :login_form before_action :redirect_to_signup_if_go_param_present, only: :login_form + before_action :did_sign_privacy_notice, only: :login_form before_action :redirect_back, if: -> { signed_in? }, only: :login_form def login @@ -86,5 +87,12 @@ def should_redirect_to_signup_welcome? def cache_alternate_signup_url set_alternate_signup_url(params[:signup_at]) end + + def did_sign_privacy_notice + contract = FinePrint.get_contract(:privacy_policy) + unless contract.signed_by?(current_user) + redirect_to pose_term_url(name: contract.name, params: request.params) + end + end end end