diff --git a/app/controllers/concerns/web_app_controller_concern.rb b/app/controllers/concerns/web_app_controller_concern.rb
index aa16270a4a..f319d07edd 100644
--- a/app/controllers/concerns/web_app_controller_concern.rb
+++ b/app/controllers/concerns/web_app_controller_concern.rb
@@ -47,7 +47,7 @@ module WebAppControllerConcern
protected
def redirect_to_tos_interstitial!
- return unless current_user&.require_tos_interstitial
+ return unless current_user&.require_tos_interstitial?
redirect_to(terms_of_service_interstitial_url)
end
diff --git a/app/views/terms_of_service_interstitial/show.html.haml b/app/views/terms_of_service_interstitial/show.html.haml
index cbb181a32d..c7fb3595f3 100644
--- a/app/views/terms_of_service_interstitial/show.html.haml
+++ b/app/views/terms_of_service_interstitial/show.html.haml
@@ -6,7 +6,8 @@
.simple_form
%h1.title= t('terms_of_service_interstitial.title', domain: site_hostname)
- %p.lead= t('terms_of_service_interstitial.preamble_html', date: l(@terms_of_service.effective_date || Time.zone.today))
+ - effective_date = @terms_of_service.effective_date || Time.zone.today
+ %p.lead= effective_date.past? ? t('terms_of_service_interstitial.past_preamble_html') : t('terms_of_service_interstitial.future_preamble_html', date: l(effective_date))
%p.lead= t('user_mailer.terms_of_service_changed.agreement', domain: site_hostname)
diff --git a/config/locales/en.yml b/config/locales/en.yml
index a5ba589002..8b5a840a3d 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1913,7 +1913,8 @@ en:
terms_of_service:
title: Terms of Service
terms_of_service_interstitial:
- preamble_html: We're making some changes to our terms of service, effective %{date}. We encourage you to review the updated terms.
+ future_preamble_html: We're making some changes to our terms of service, which will be effective on %{date}. We encourage you to review the updated terms.
+ past_preamble_html: We have changed our terms of service since your last visit. We encourage you to review the updated terms.
review_link: Review terms of service
title: The terms of service of %{domain} are changing
themes:
diff --git a/spec/workers/admin/distribute_terms_of_service_notification_worker_spec.rb b/spec/workers/admin/distribute_terms_of_service_notification_worker_spec.rb
index a09e581151..24313f9cae 100644
--- a/spec/workers/admin/distribute_terms_of_service_notification_worker_spec.rb
+++ b/spec/workers/admin/distribute_terms_of_service_notification_worker_spec.rb
@@ -28,8 +28,8 @@ RSpec.describe Admin::DistributeTermsOfServiceNotificationWorker do
subject: I18n.t('user_mailer.terms_of_service_changed.subject')
)
- expect(user.reload.require_tos_interstitial).to be false
- expect(old_user.reload.require_tos_interstitial).to be true
+ expect(user.reload.require_tos_interstitial?).to be false
+ expect(old_user.reload.require_tos_interstitial?).to be true
end
end
end