diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb index dfc6d6909..1f692b430 100644 --- a/app/controllers/organisations_controller.rb +++ b/app/controllers/organisations_controller.rb @@ -170,6 +170,11 @@ class OrganisationsController < ApplicationController organisation: current_user.organisation, signed_at: Time.zone.now, data_protection_officer: current_user, + organisation_name: @organisation.name, + organisation_address: @organisation.address_string, + organisation_phone_number: @organisation.phone, + dpo_email: current_user.email, + dpo_name: current_user.name, ) if data_sharing_agreement.save diff --git a/app/helpers/data_sharing_agreement_helper.rb b/app/helpers/data_sharing_agreement_helper.rb index 3ab0abc1c..8664dd15b 100644 --- a/app/helpers/data_sharing_agreement_helper.rb +++ b/app/helpers/data_sharing_agreement_helper.rb @@ -31,6 +31,16 @@ module DataSharingAgreementHelper end end + def org_name_for_data_sharing_agreement(data_sharing_agreement, user) + if data_sharing_agreement.present? + data_sharing_agreement.organisation_name + elsif user.is_dpo? + user.organisation.name + else + "[Data provider organisation]" + end + end + private def data_sharing_agreement_first_line(organisation:, user:) diff --git a/app/views/organisations/data_sharing_agreement.html.erb b/app/views/organisations/data_sharing_agreement.html.erb index c9c96fb83..2d17a3c27 100644 --- a/app/views/organisations/data_sharing_agreement.html.erb +++ b/app/views/organisations/data_sharing_agreement.html.erb @@ -3,7 +3,7 @@

- [Data provider organisation] and Department for Levelling Up, Housing and Communities + <%= org_name_for_data_sharing_agreement(@data_sharing_agreement, current_user) %> and Department for Levelling Up, Housing and Communities

<% if @data_sharing_agreement %> @@ -15,7 +15,11 @@ <% end %>

between

-

1) [core data provider organisation] of [full address] (“CORE Data Provider”)

+ <% if @data_sharing_agreement %> +

1) <%= @data_sharing_agreement.organisation_name %> of <%= @data_sharing_agreement.organisation_address %> (“CORE Data Provider”)

+ <% else %> +

1) [Data provider organisation] of [full address] (“CORE Data Provider”)

+ <% end %>

and

2) The Department for Levelling Up, Housing and Communities of 2 Marsham Street, London, SW1P 4DF (“DLUHC”)

1. Background

@@ -101,8 +105,11 @@

11.2. CORE data providers and DLUHC acknowledge that any loss or unauthorised release of the Data can be treated as valid grounds for immediately terminating this agreement by DLUHC.

12. Authorised representatives

12.1. CORE data providers and DLUHC will each appoint an Authorised Representative to be the primary point of contact in all day-to-day matters relating to this Agreement:

-

12.2. For [the Data Provider]: Name: - Postal Address: E-mail address: Telephone number:

+ <% if @data_sharing_agreement %> +

12.2. For <%= @data_sharing_agreement.organisation_name %>: Name: <%= @data_sharing_agreement.dpo_name %>, Postal Address: <%= @data_sharing_agreement.organisation_address %>, E-mail address: <%= @data_sharing_agreement.dpo_email %>, Telephone number: <%= @data_sharing_agreement.organisation_phone_number %>

+ <% else %> +

12.2. For [Organisation name]: Name: [DPO name], Postal Address: [Organisation address], E-mail address: [DPO email], Telephone number: [Organisation telephone number]

+ <% end %>

12.3. For DLUHC: Name: Rachel Worledge Postal Address: South-west section, 4th Floor, Fry Building, 2 Marsham Street, London, SW1P 4DF E-mail address: Rachel.Worledge@levellingup.gov.uk

@@ -118,7 +125,7 @@

16. Statutory compliance

16.1. The Parties shall comply with all relevant legislation, regulations, orders, statutory instruments and any amendments or re-enactments thereof from the commencement of this agreement.

As witness of which the parties have set their hands on the day and year first above written - signed for and on behalf of [job title of an officer with appropriate delegated authority] for [core data provider name], by:

+ signed for and on behalf of [job title of an officer with appropriate delegated authority] for <%= org_name_for_data_sharing_agreement(@data_sharing_agreement, current_user) %>, by: