Take review feedback into account

This commit is contained in:
Claire 2025-05-05 14:27:53 +02:00
parent 5d74414e9b
commit a6c8f33fc5
4 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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)

View File

@ -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 <strong>%{date}</strong>. 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 <strong>%{date}</strong>. 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:

View File

@ -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