Skip to content

Commit

Permalink
Add organisation_privacy_notice_url personalisation
Browse files Browse the repository at this point in the history
This ensures that the variable is provided to any templates used in
GOV.UK Notify to allow it to be shown to users.
  • Loading branch information
thomasleese committed Jan 16, 2025
1 parent 6a43247 commit dd1457e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/lib/govuk_notify_personalisation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def call
next_session_dates:,
next_session_dates_or:,
not_catch_up:,
organisation_privacy_notice_url:,
organisation_privacy_policy_url:,
outcome_administered:,
outcome_not_administered:,
Expand Down Expand Up @@ -155,6 +156,10 @@ def next_session_dates_or
.to_sentence(last_word_connector: ", or ", two_words_connector: " or ")
end

def organisation_privacy_notice_url
organisation.privacy_notice_url
end

def organisation_privacy_policy_url
organisation.privacy_policy_url
end
Expand Down
3 changes: 2 additions & 1 deletion spec/lib/govuk_notify_personalisation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
next_session_dates: "Thursday 1 January",
next_session_dates_or: "Thursday 1 January",
not_catch_up: "yes",
organisation_privacy_policy_url: "https://example.com/privacy",
organisation_privacy_notice_url: "https://example.com/privacy-notice",
organisation_privacy_policy_url: "https://example.com/privacy-policy",
programme_name: "HPV",
short_patient_name: "John",
short_patient_name_apos: "John’s",
Expand Down

0 comments on commit dd1457e

Please sign in to comment.