Files
notifications-admin/app/navigation.py

1354 lines
41 KiB
Python
Raw Normal View History

from itertools import chain
from flask import request
class Navigation:
mapping = {}
exclude = {}
selected_class = "selected"
def __init__(self):
self.mapping = {
navigation: {
# if not specified, assume endpoints are all in the `main` blueprint.
self._get_endpoint_with_blueprint(endpoint) for endpoint in endpoints
} for navigation, endpoints in self.mapping.items()
}
@property
def endpoints_with_navigation(self):
return tuple(chain.from_iterable((
endpoints
for navigation_item, endpoints in self.mapping.items()
)))
@property
def endpoints_without_navigation(self):
return tuple(
self._get_endpoint_with_blueprint(endpoint) for endpoint in self.exclude
2020-07-01 13:27:12 +01:00
) + ('static', 'status.show_status', 'metrics')
def is_selected(self, navigation_item):
if request.endpoint in self.mapping[navigation_item]:
return " " + self.selected_class
return ''
@staticmethod
def _get_endpoint_with_blueprint(endpoint):
return endpoint if '.' in endpoint else 'main.{}'.format(endpoint)
class HeaderNavigation(Navigation):
mapping = {
'support': {
'bat_phone',
'feedback',
'support',
'support_public',
'thanks',
'triage',
},
'features': {
'features',
'features_email',
'features_letters',
'features_sms',
'message_status',
'roadmap',
'security',
'terms',
'trial_mode_new',
'using_notify',
},
'pricing': {
'pricing',
'how_to_pay',
},
'documentation': {
'documentation',
'integration_testing',
},
'user-profile': {
'user_profile',
'user_profile_email',
'user_profile_email_authenticate',
'user_profile_email_confirm',
'user_profile_mobile_number',
'user_profile_mobile_number_authenticate',
'user_profile_mobile_number_confirm',
'user_profile_name',
'user_profile_password',
'user_profile_disable_platform_admin_view',
},
'platform-admin': {
'archive_user',
'clear_cache',
'create_email_branding',
'create_letter_branding',
'edit_sms_provider_ratio',
'email_branding',
2019-08-13 16:25:26 +01:00
'find_services_by_name',
'find_users_by_email',
'letter_branding',
'live_services',
2019-04-24 16:23:12 +01:00
'live_services_csv',
'notifications_sent_by_service',
'performance_platform_xlsx',
'usage_for_all_services',
'organisations',
'platform_admin',
'platform_admin_list_complaints',
'platform_admin_reports',
'platform_admin_returned_letters',
'platform_admin_splash_page',
'suspend_service',
'trial_services',
'update_email_branding',
'update_letter_branding',
'user_information',
'view_provider',
'view_providers',
},
'sign-in': {
'revalidate_email_sent',
'sign_in',
'two_factor',
'two_factor_email',
'two_factor_email_sent',
'two_factor_email_interstitial',
'verify',
'verify_email',
},
}
exclude = {
'accept_invite',
'accept_org_invite',
'action_blocked',
'add_data_retention',
'add_organisation',
'add_organisation_from_gp_service',
'add_organisation_from_nhs_local_service',
'add_service',
'add_service_template',
'api_callbacks',
'api_documentation',
'api_integration',
'api_keys',
'archive_service',
'branding_request',
'callbacks',
'cancel_invited_org_user',
'cancel_invited_user',
'cancel_job',
'cancel_letter',
'cancel_letter_job',
'check_and_resend_text_code',
'check_and_resend_verification_code',
'check_messages',
'no_cookie.check_messages_preview',
'check_notification',
'no_cookie.check_notification_preview',
'choose_account',
'choose_from_contact_list',
'choose_service',
'choose_template',
'choose_template_to_copy',
'confirm_edit_organisation_name',
'confirm_edit_user_email',
'confirm_edit_user_mobile_number',
'confirm_redact_template',
'conversation',
'conversation_reply',
'conversation_reply_with_template',
'conversation_updates',
'cookies',
'copy_template',
'create_api_key',
'data_retention',
'delete_service_template',
'delete_template_folder',
'delivery_and_failure',
'delivery_status_callback',
'design_content',
'download_contact_list',
'download_notifications_csv',
'edit_data_retention',
'edit_organisation_agreement',
'edit_organisation_crown_status',
'edit_organisation_domains',
'edit_organisation_email_branding',
'edit_organisation_letter_branding',
'edit_organisation_go_live_notes',
'edit_organisation_name',
'edit_organisation_type',
'edit_provider',
'edit_service_template',
'edit_template_postage',
'edit_user_org_permissions',
'edit_user_email',
'edit_user_mobile_number',
'edit_user_permissions',
'email_not_received',
'email_template',
'error',
'estimate_usage',
'forgot_password',
'get_example_csv',
'get_notifications_as_json',
2019-10-17 16:15:28 +01:00
'get_started',
'get_started_old',
'go_to_dashboard_after_tour',
'guidance_index',
'branding_and_customisation',
'create_and_send_messages',
'edit_and_format_messages',
'send_files_by_email',
'upload_a_letter',
'history',
'inbound_sms_admin',
'inbox',
'inbox_download',
'inbox_updates',
'index',
'information_risk_management',
'information_security',
'invite_org_user',
'invite_user',
'no_cookie.letter_branding_preview_image',
'letter_spec',
'letter_template',
'link_service_to_organisation',
'manage_org_users',
'manage_template_folder',
'manage_users',
'monthly',
'new_password',
'old_integration_testing',
'old_roadmap',
'old_service_dashboard',
'old_terms',
'old_using_notify',
'organisation_dashboard',
'organisation_trial_mode_services',
'organisation_settings',
'organisation_preview_email_branding',
'organisation_preview_letter_branding',
'privacy',
'public_agreement',
'public_download_agreement',
'received_text_messages_callback',
'redact_template',
'register',
'register_from_invite',
'register_from_org_invite',
'registration_continue',
'remove_user_from_organisation',
'remove_user_from_service',
'request_to_go_live',
'resend_email_link',
'resend_email_verification',
'resume_service',
'returned_letter_summary',
'returned_letters',
'returned_letters_report',
'revoke_api_key',
'send_messages',
'send_notification',
'send_one_off',
'send_one_off_letter_address',
'send_one_off_step',
'send_test',
'no_cookie.send_test_preview',
'send_test_step',
'send_from_contact_list',
'send_uploaded_letter',
'service_add_email_reply_to',
'service_add_letter_contact',
'service_add_sms_sender',
'service_agreement',
Add pages to let users accept the agreement online At the moment, the process for accepting the data sharing and financial agreement is: 1. download a pdf * print it out * get someone to sign it * scan it * email it back to us * we rename the file and save it in Google Drive * we then update the organisation to say the MOU is signed * sometimes we also: * print it out and get it counter-signed * scan it again * email it back to the service Let's not do that any more. When the first service for an organisation that doesn't have the agreement in place is in the process of going live, then they should be able to accept the agreement online as part of the go live flow. This commit adds the pages that let someone do that. Where the checklist shows the agreement as **[not completed]** then they can follow a link where they can download it (as happens now). From here, they should then also be able to provide some info to accept it. The info that we need is: **Version** – because we version the agreements occasionally, we need to know which version they are accepting. It may not be the latest one if they downloaded it a while ago and it took time to be signed off **Who is accepting the agreement** – this will often be someone in the finance team, and not necessarily a team member, so we should let the person either accept as themselves, or on behalf of someone else. If it's on behalf of someone else we need to the name and email address of that person so we have that on record. Obvs if it's them accepting it themselves, we have that already (so we just store their user ID and not their name or email address). We then replay the collected info back in a sort of legally binding kind of way pulling in the organisation name too. The wording we’re using is inspired by what GOV.UK Pay have. Then there’s a big green button they can click to accept the agreement, which stores their user ID and and timestamp.
2019-06-18 14:24:29 +01:00
'service_accept_agreement',
'service_confirm_agreement',
'service_confirm_delete_email_reply_to',
'service_confirm_delete_letter_contact',
'service_confirm_delete_sms_sender',
'service_dashboard',
'service_dashboard_updates',
'service_delete_email_reply_to',
'service_delete_letter_contact',
'service_delete_sms_sender',
'service_download_agreement',
'service_edit_email_reply_to',
'service_edit_letter_contact',
'service_edit_sms_sender',
'service_email_reply_to',
'service_letter_contact_details',
'service_make_blank_default_letter_contact',
'service_name_change',
'service_name_change_confirm',
'service_preview_email_branding',
'service_preview_letter_branding',
'service_set_auth_type',
'service_set_channel',
'send_files_by_email_contact_details',
'service_set_email_branding',
'service_set_inbound_number',
'service_set_inbound_sms',
'service_set_international_sms',
'service_set_letter_branding',
'service_set_letters',
'service_set_reply_to_email',
'service_set_sms_prefix',
'service_settings',
'service_sms_senders',
'service_switch_count_as_live',
'service_switch_live',
'service_set_permission',
'service_set_broadcast_permission',
'service_verify_reply_to_address',
'service_verify_reply_to_address_updates',
'services_or_dashboard',
'set_free_sms_allowance',
'set_sender',
'set_template_sender',
'show_accounts_or_dashboard',
'sign_out',
'start_job',
'start_tour',
'styleguide',
'submit_request_to_go_live',
'template_history',
'template_usage',
'trial_mode',
'upload_contact_list',
'check_contact_list',
'save_contact_list',
'contact_list',
'delete_contact_list',
'upload_letter',
'uploaded_letter_preview',
'uploaded_letters',
'uploads',
'usage',
'view_job',
'view_job_csv',
'view_job_updates',
'view_jobs',
'view_letter_notification_as_preview',
'no_cookie.view_letter_template_preview',
'view_letter_upload_as_preview',
'view_notification',
'view_notification_updates',
'view_notifications',
'view_notifications_csv',
'view_template',
'view_template_version',
'no_cookie.view_template_version_preview',
'view_template_versions',
'guest_list',
'old_guest_list',
'who_can_use_notify',
2020-05-21 11:17:44 +01:00
'who_its_for',
'broadcast_tour',
'broadcast_dashboard',
'broadcast_dashboard_updates',
'broadcast',
'preview_broadcast_areas',
'choose_broadcast_library',
'choose_broadcast_area',
'choose_broadcast_sub_area',
'remove_broadcast_area',
'preview_broadcast_message',
'view_broadcast_message',
'approve_broadcast_message',
'reject_broadcast_message',
'cancel_broadcast_message',
}
# header HTML now comes from GOVUK Frontend so requires a boolean, not an attribute
def is_selected(self, navigation_item):
return request.endpoint in self.mapping[navigation_item]
class MainNavigation(Navigation):
mapping = {
'dashboard': {
'broadcast_tour',
'broadcast_dashboard',
'broadcast_dashboard_updates',
'conversation',
'inbox',
'monthly',
'returned_letter_summary',
'returned_letters',
'service_dashboard',
'template_usage',
'view_notification',
'view_notifications',
},
'templates': {
'action_blocked',
'add_service_template',
'check_messages',
'check_notification',
'choose_from_contact_list',
'choose_template',
'choose_template_to_copy',
'confirm_redact_template',
'conversation_reply',
'copy_template',
'delete_service_template',
'edit_service_template',
'edit_template_postage',
'manage_template_folder',
'send_messages',
'send_one_off',
'send_one_off_letter_address',
'send_one_off_step',
'send_test',
'no_cookie.send_test_preview',
'send_test_step',
'set_sender',
'set_template_sender',
'view_template',
'view_template_version',
'view_template_versions',
'broadcast',
'preview_broadcast_areas',
'choose_broadcast_library',
'choose_broadcast_area',
'choose_broadcast_sub_area',
'remove_broadcast_area',
'preview_broadcast_message',
'view_broadcast_message',
'approve_broadcast_message',
'reject_broadcast_message',
'cancel_broadcast_message',
},
'uploads': {
'upload_contact_list',
'check_contact_list',
'save_contact_list',
'contact_list',
'delete_contact_list',
'upload_letter',
'uploaded_letter_preview',
'uploaded_letters',
'uploads',
'view_job',
'view_jobs',
},
'team-members': {
'confirm_edit_user_email',
'confirm_edit_user_mobile_number',
'edit_user_email',
'edit_user_mobile_number',
'edit_user_permissions',
'invite_user',
'manage_users',
'remove_user_from_service',
},
'usage': {
'usage',
},
'settings': {
'add_organisation_from_gp_service',
'add_organisation_from_nhs_local_service',
'branding_request',
'estimate_usage',
'link_service_to_organisation',
'request_to_go_live',
'service_add_email_reply_to',
'service_add_letter_contact',
'service_add_sms_sender',
'service_agreement',
Add pages to let users accept the agreement online At the moment, the process for accepting the data sharing and financial agreement is: 1. download a pdf * print it out * get someone to sign it * scan it * email it back to us * we rename the file and save it in Google Drive * we then update the organisation to say the MOU is signed * sometimes we also: * print it out and get it counter-signed * scan it again * email it back to the service Let's not do that any more. When the first service for an organisation that doesn't have the agreement in place is in the process of going live, then they should be able to accept the agreement online as part of the go live flow. This commit adds the pages that let someone do that. Where the checklist shows the agreement as **[not completed]** then they can follow a link where they can download it (as happens now). From here, they should then also be able to provide some info to accept it. The info that we need is: **Version** – because we version the agreements occasionally, we need to know which version they are accepting. It may not be the latest one if they downloaded it a while ago and it took time to be signed off **Who is accepting the agreement** – this will often be someone in the finance team, and not necessarily a team member, so we should let the person either accept as themselves, or on behalf of someone else. If it's on behalf of someone else we need to the name and email address of that person so we have that on record. Obvs if it's them accepting it themselves, we have that already (so we just store their user ID and not their name or email address). We then replay the collected info back in a sort of legally binding kind of way pulling in the organisation name too. The wording we’re using is inspired by what GOV.UK Pay have. Then there’s a big green button they can click to accept the agreement, which stores their user ID and and timestamp.
2019-06-18 14:24:29 +01:00
'service_accept_agreement',
'service_confirm_agreement',
'service_confirm_delete_email_reply_to',
'service_confirm_delete_letter_contact',
'service_confirm_delete_sms_sender',
'service_edit_email_reply_to',
'service_edit_letter_contact',
'service_edit_sms_sender',
'service_email_reply_to',
'service_letter_contact_details',
'service_make_blank_default_letter_contact',
'service_name_change',
'service_name_change_confirm',
'service_preview_email_branding',
'service_preview_letter_branding',
'service_set_auth_type',
'service_set_channel',
'send_files_by_email_contact_details',
'service_set_email_branding',
'service_set_inbound_number',
'service_set_inbound_sms',
'service_set_international_sms',
'service_set_letters',
'service_set_reply_to_email',
'service_set_sms_prefix',
'service_verify_reply_to_address',
'service_verify_reply_to_address_updates',
'service_settings',
'service_sms_senders',
'set_free_sms_allowance',
'service_set_letter_branding',
'submit_request_to_go_live',
},
'api-integration': {
'api_callbacks',
'api_documentation',
'api_integration',
'api_keys',
'create_api_key',
'delivery_status_callback',
'received_text_messages_callback',
'revoke_api_key',
'guest_list',
'old_guest_list',
},
}
exclude = {
'accept_invite',
'accept_org_invite',
'add_data_retention',
'add_organisation',
'add_service',
'archive_service',
'archive_user',
'bat_phone',
'callbacks',
'cancel_invited_org_user',
'cancel_invited_user',
'cancel_job',
'cancel_letter',
'cancel_letter_job',
'check_and_resend_text_code',
'check_and_resend_verification_code',
'no_cookie.check_messages_preview',
'no_cookie.check_notification_preview',
'choose_account',
'choose_service',
'clear_cache',
'confirm_edit_organisation_name',
'conversation_reply_with_template',
'conversation_updates',
'cookies',
'create_email_branding',
'create_letter_branding',
'data_retention',
'delete_template_folder',
'delivery_and_failure',
'design_content',
'documentation',
'download_contact_list',
'download_notifications_csv',
'edit_data_retention',
'edit_organisation_agreement',
'edit_organisation_crown_status',
'edit_organisation_email_branding',
'edit_organisation_domains',
'edit_organisation_go_live_notes',
'edit_organisation_letter_branding',
'edit_organisation_name',
'edit_organisation_type',
'edit_provider',
'edit_sms_provider_ratio',
'edit_user_org_permissions',
'email_branding',
'email_not_received',
'email_template',
'error',
'features',
'features_email',
'features_letters',
'features_sms',
'feedback',
2019-08-13 16:25:26 +01:00
'find_services_by_name',
'find_users_by_email',
'forgot_password',
'get_example_csv',
'get_notifications_as_json',
2019-10-17 16:15:28 +01:00
'get_started',
'get_started_old',
'go_to_dashboard_after_tour',
'guidance_index',
'branding_and_customisation',
'create_and_send_messages',
'edit_and_format_messages',
'send_files_by_email',
'upload_a_letter',
'history',
'how_to_pay',
'inbound_sms_admin',
'inbox_download',
'inbox_updates',
'index',
'information_risk_management',
'information_security',
'integration_testing',
'invite_org_user',
'letter_branding',
'no_cookie.letter_branding_preview_image',
'live_services',
2019-04-24 16:23:12 +01:00
'live_services_csv',
'letter_spec',
'letter_template',
'message_status',
'manage_org_users',
'new_password',
'notifications_sent_by_service',
'old_integration_testing',
'old_roadmap',
'old_service_dashboard',
'old_terms',
'old_using_notify',
'organisation_dashboard',
'organisation_trial_mode_services',
'organisation_preview_email_branding',
'organisation_preview_letter_branding',
'organisation_settings',
'organisations',
'performance_platform_xlsx',
'platform_admin',
'platform_admin_list_complaints',
'platform_admin_reports',
'platform_admin_returned_letters',
'platform_admin_splash_page',
'pricing',
'privacy',
'public_agreement',
'public_download_agreement',
'redact_template',
'register',
'register_from_invite',
'register_from_org_invite',
'registration_continue',
'remove_user_from_organisation',
'resend_email_link',
'resend_email_verification',
'resume_service',
'returned_letters_report',
'revalidate_email_sent',
'roadmap',
'security',
'send_notification',
'send_from_contact_list',
'send_uploaded_letter',
'service_dashboard_updates',
'service_delete_email_reply_to',
'service_delete_letter_contact',
'service_delete_sms_sender',
'service_download_agreement',
'service_switch_count_as_live',
'service_switch_live',
'service_set_permission',
'service_set_broadcast_permission',
'services_or_dashboard',
'show_accounts_or_dashboard',
'sign_in',
'sign_out',
'start_job',
'start_tour',
'styleguide',
'support',
'support_public',
'suspend_service',
'template_history',
'terms',
'thanks',
'triage',
'trial_mode',
'trial_mode_new',
'trial_services',
'two_factor',
'two_factor_email',
'two_factor_email_sent',
'two_factor_email_interstitial',
'update_email_branding',
'update_letter_branding',
'usage_for_all_services',
'user_information',
'user_profile',
'user_profile_email',
'user_profile_email_authenticate',
'user_profile_email_confirm',
'user_profile_mobile_number',
'user_profile_mobile_number_authenticate',
'user_profile_mobile_number_confirm',
'user_profile_name',
'user_profile_password',
'user_profile_disable_platform_admin_view',
'using_notify',
'verify',
'verify_email',
'view_job_csv',
'view_job_updates',
'view_letter_notification_as_preview',
'no_cookie.view_letter_template_preview',
'view_letter_upload_as_preview',
'view_notification_updates',
'view_notifications_csv',
'view_provider',
'view_providers',
'no_cookie.view_template_version_preview',
'who_can_use_notify',
2020-05-21 11:17:44 +01:00
'who_its_for',
}
class CaseworkNavigation(Navigation):
mapping = {
'dashboard': {
'broadcast_tour',
'broadcast_dashboard',
'broadcast_dashboard_updates',
},
'send-one-off': {
'choose_from_contact_list',
'choose_template',
'send_one_off',
'send_one_off_letter_address',
'send_one_off_step',
'send_test',
'send_test_step',
},
'sent-messages': {
'view_notifications',
'view_notification',
},
'uploads': {
'view_jobs',
'view_job',
'upload_contact_list',
'check_contact_list',
'save_contact_list',
'contact_list',
'delete_contact_list',
'upload_letter',
'uploaded_letter_preview',
'uploaded_letters',
'uploads',
},
}
exclude = {
'accept_invite',
'accept_org_invite',
'action_blocked',
'add_data_retention',
'add_organisation',
'add_organisation_from_gp_service',
'add_organisation_from_nhs_local_service',
'add_service',
'add_service_template',
'api_callbacks',
'api_documentation',
'api_integration',
'api_keys',
'archive_service',
'archive_user',
'bat_phone',
'branding_request',
'callbacks',
'cancel_invited_org_user',
'cancel_invited_user',
'cancel_job',
'cancel_letter',
'cancel_letter_job',
'check_and_resend_text_code',
'check_and_resend_verification_code',
'check_messages',
'no_cookie.check_messages_preview',
'check_notification',
'no_cookie.check_notification_preview',
'choose_account',
'choose_service',
'choose_template_to_copy',
'clear_cache',
'edit_organisation_agreement',
'edit_organisation_crown_status',
'edit_organisation_domains',
'edit_organisation_email_branding',
'edit_organisation_go_live_notes',
'edit_organisation_letter_branding',
'confirm_edit_organisation_name',
'confirm_edit_user_email',
'confirm_edit_user_mobile_number',
'confirm_redact_template',
'conversation',
'conversation_reply',
'conversation_reply_with_template',
'conversation_updates',
'cookies',
'copy_template',
'create_api_key',
'create_email_branding',
'create_letter_branding',
'data_retention',
'delete_service_template',
'delete_template_folder',
'delivery_and_failure',
'delivery_status_callback',
'design_content',
'documentation',
'download_contact_list',
'download_notifications_csv',
'edit_data_retention',
'edit_organisation_agreement',
'edit_organisation_crown_status',
'edit_organisation_domains',
'edit_organisation_name',
'edit_organisation_type',
'edit_provider',
'edit_sms_provider_ratio',
'edit_service_template',
'edit_template_postage',
'edit_user_email',
'edit_user_mobile_number',
'edit_user_org_permissions',
'edit_user_permissions',
'email_branding',
'email_not_received',
'email_template',
'error',
'estimate_usage',
'features',
'features_email',
'features_letters',
'features_sms',
'feedback',
2019-08-13 16:25:26 +01:00
'find_services_by_name',
'find_users_by_email',
'forgot_password',
'get_example_csv',
'get_notifications_as_json',
2019-10-17 16:15:28 +01:00
'get_started',
'get_started_old',
'go_to_dashboard_after_tour',
'guidance_index',
'branding_and_customisation',
'create_and_send_messages',
'edit_and_format_messages',
'send_files_by_email',
'upload_a_letter',
'history',
'how_to_pay',
'inbound_sms_admin',
'inbox_download',
'inbox_updates',
'inbox',
'index',
'information_risk_management',
'information_security',
'integration_testing',
'invite_org_user',
'invite_user',
'no_cookie.letter_branding_preview_image',
'letter_branding',
'letter_spec',
'letter_template',
'link_service_to_organisation',
'live_services',
2019-04-24 16:23:12 +01:00
'live_services_csv',
'manage_org_users',
'manage_template_folder',
'manage_users',
'message_status',
'monthly',
'new_password',
'notifications_sent_by_service',
'old_integration_testing',
'old_roadmap',
'old_service_dashboard',
'old_terms',
'old_using_notify',
'organisation_dashboard',
'organisation_trial_mode_services',
'organisation_preview_email_branding',
'organisation_preview_letter_branding',
'organisation_settings',
'organisations',
'performance_platform_xlsx',
'platform_admin_list_complaints',
'platform_admin_reports',
'platform_admin_returned_letters',
'platform_admin',
'platform_admin_splash_page',
'pricing',
'privacy',
'public_agreement',
'public_download_agreement',
'received_text_messages_callback',
'redact_template',
'register_from_invite',
'register_from_org_invite',
'register',
'registration_continue',
'remove_user_from_organisation',
'remove_user_from_service',
'request_to_go_live',
'resend_email_link',
'resend_email_verification',
'resume_service',
'returned_letter_summary',
'returned_letters',
'returned_letters_report',
'revalidate_email_sent',
'revoke_api_key',
'roadmap',
'security',
'send_messages',
'send_notification',
'no_cookie.send_test_preview',
'send_from_contact_list',
'send_uploaded_letter',
'service_add_email_reply_to',
'service_add_letter_contact',
'service_add_sms_sender',
'service_agreement',
Add pages to let users accept the agreement online At the moment, the process for accepting the data sharing and financial agreement is: 1. download a pdf * print it out * get someone to sign it * scan it * email it back to us * we rename the file and save it in Google Drive * we then update the organisation to say the MOU is signed * sometimes we also: * print it out and get it counter-signed * scan it again * email it back to the service Let's not do that any more. When the first service for an organisation that doesn't have the agreement in place is in the process of going live, then they should be able to accept the agreement online as part of the go live flow. This commit adds the pages that let someone do that. Where the checklist shows the agreement as **[not completed]** then they can follow a link where they can download it (as happens now). From here, they should then also be able to provide some info to accept it. The info that we need is: **Version** – because we version the agreements occasionally, we need to know which version they are accepting. It may not be the latest one if they downloaded it a while ago and it took time to be signed off **Who is accepting the agreement** – this will often be someone in the finance team, and not necessarily a team member, so we should let the person either accept as themselves, or on behalf of someone else. If it's on behalf of someone else we need to the name and email address of that person so we have that on record. Obvs if it's them accepting it themselves, we have that already (so we just store their user ID and not their name or email address). We then replay the collected info back in a sort of legally binding kind of way pulling in the organisation name too. The wording we’re using is inspired by what GOV.UK Pay have. Then there’s a big green button they can click to accept the agreement, which stores their user ID and and timestamp.
2019-06-18 14:24:29 +01:00
'service_accept_agreement',
'service_confirm_agreement',
'service_confirm_delete_email_reply_to',
'service_confirm_delete_letter_contact',
'service_confirm_delete_sms_sender',
'service_dashboard',
'service_dashboard_updates',
'service_delete_email_reply_to',
'service_delete_letter_contact',
'service_delete_sms_sender',
'service_download_agreement',
'service_edit_email_reply_to',
'service_edit_letter_contact',
'service_edit_sms_sender',
'service_email_reply_to',
'service_letter_contact_details',
'service_make_blank_default_letter_contact',
'service_name_change',
'service_name_change_confirm',
'service_preview_email_branding',
'service_preview_letter_branding',
'service_set_auth_type',
'service_set_channel',
'send_files_by_email_contact_details',
'service_set_email_branding',
'service_set_inbound_number',
'service_set_inbound_sms',
'service_set_international_sms',
'service_set_letters',
'service_set_reply_to_email',
'service_set_sms_prefix',
'service_settings',
'service_sms_senders',
'service_switch_count_as_live',
'service_switch_live',
'service_set_permission',
'service_set_broadcast_permission',
'service_verify_reply_to_address',
'service_verify_reply_to_address_updates',
'services_or_dashboard',
'set_free_sms_allowance',
'service_set_letter_branding',
'set_sender',
'set_template_sender',
'show_accounts_or_dashboard',
'sign_in',
'sign_out',
'start_job',
'start_tour',
'styleguide',
'submit_request_to_go_live',
'support',
'support_public',
'suspend_service',
'template_history',
'template_usage',
'terms',
'thanks',
'triage',
'trial_mode',
'trial_mode_new',
'trial_services',
'two_factor',
'two_factor_email',
'two_factor_email_sent',
'two_factor_email_interstitial',
'update_email_branding',
'update_letter_branding',
'usage',
'usage_for_all_services',
'user_information',
'user_profile',
'user_profile_email',
'user_profile_email_authenticate',
'user_profile_email_confirm',
'user_profile_mobile_number',
'user_profile_mobile_number_authenticate',
'user_profile_mobile_number_confirm',
'user_profile_name',
'user_profile_password',
'user_profile_disable_platform_admin_view',
'using_notify',
'verify',
'verify_email',
'view_job_csv',
'view_job_updates',
'view_letter_notification_as_preview',
'no_cookie.view_letter_template_preview',
'view_letter_upload_as_preview',
'view_notification_updates',
'view_notifications_csv',
'view_provider',
'view_providers',
'view_template',
'view_template_version',
'no_cookie.view_template_version_preview',
'view_template_versions',
'guest_list',
'old_guest_list',
'who_can_use_notify',
2020-05-21 11:17:44 +01:00
'who_its_for',
'broadcast',
'preview_broadcast_areas',
'choose_broadcast_library',
'choose_broadcast_area',
'choose_broadcast_sub_area',
'remove_broadcast_area',
'preview_broadcast_message',
'view_broadcast_message',
'approve_broadcast_message',
'reject_broadcast_message',
'cancel_broadcast_message',
}
class OrgNavigation(Navigation):
mapping = {
'dashboard': {
'organisation_dashboard',
},
'settings': {
'confirm_edit_organisation_name',
'edit_organisation_agreement',
'edit_organisation_crown_status',
'edit_organisation_domains',
'edit_organisation_email_branding',
'edit_organisation_letter_branding',
'edit_organisation_domains',
'edit_organisation_go_live_notes',
'edit_organisation_name',
'edit_organisation_type',
'organisation_preview_email_branding',
'organisation_preview_letter_branding',
'organisation_settings',
},
'team-members': {
'edit_user_org_permissions',
'invite_org_user',
'manage_org_users',
'remove_user_from_organisation',
},
'trial-services': {
'organisation_trial_mode_services',
}
}
exclude = {
'accept_invite',
'accept_org_invite',
'action_blocked',
'add_data_retention',
'add_organisation',
'add_organisation_from_gp_service',
'add_organisation_from_nhs_local_service',
'add_service',
'add_service_template',
'api_callbacks',
'api_documentation',
'api_integration',
'api_keys',
'archive_service',
'archive_user',
'bat_phone',
'branding_request',
'callbacks',
'cancel_invited_org_user',
'cancel_invited_user',
'cancel_job',
'cancel_letter',
'cancel_letter_job',
'check_and_resend_text_code',
'check_and_resend_verification_code',
'check_messages',
'no_cookie.check_messages_preview',
'check_notification',
'no_cookie.check_notification_preview',
'choose_account',
'choose_from_contact_list',
'choose_service',
'choose_template',
'choose_template_to_copy',
'clear_cache',
'confirm_edit_user_email',
'confirm_edit_user_mobile_number',
'confirm_redact_template',
'conversation',
'conversation_reply',
'conversation_reply_with_template',
'conversation_updates',
'cookies',
'copy_template',
'create_api_key',
'create_email_branding',
'create_letter_branding',
'data_retention',
'delete_service_template',
'delete_template_folder',
'delivery_and_failure',
'delivery_status_callback',
'design_content',
'documentation',
'download_contact_list',
'download_notifications_csv',
'edit_data_retention',
'edit_provider',
'edit_service_template',
'edit_sms_provider_ratio',
'edit_template_postage',
'edit_user_email',
'edit_user_mobile_number',
'edit_user_permissions',
'email_branding',
'email_not_received',
'email_template',
'error',
'estimate_usage',
'features',
'features_email',
'features_letters',
'features_sms',
'feedback',
2019-08-13 16:25:26 +01:00
'find_services_by_name',
'find_users_by_email',
'forgot_password',
'get_example_csv',
'get_notifications_as_json',
2019-10-17 16:15:28 +01:00
'get_started',
'get_started_old',
'go_to_dashboard_after_tour',
'guidance_index',
'branding_and_customisation',
'create_and_send_messages',
'edit_and_format_messages',
'send_files_by_email',
'upload_a_letter',
'history',
'how_to_pay',
'inbound_sms_admin',
'inbox',
'inbox_download',
'inbox_updates',
'index',
'information_risk_management',
'information_security',
'integration_testing',
'invite_user',
'letter_branding',
'no_cookie.letter_branding_preview_image',
'letter_spec',
'letter_template',
'link_service_to_organisation',
'live_services',
2019-04-24 16:23:12 +01:00
'live_services_csv',
'manage_template_folder',
'manage_users',
'message_status',
'monthly',
'new_password',
'notifications_sent_by_service',
'old_integration_testing',
'old_roadmap',
'old_service_dashboard',
'old_terms',
'old_using_notify',
'organisations',
'performance_platform_xlsx',
'platform_admin',
'platform_admin_list_complaints',
'platform_admin_reports',
'platform_admin_returned_letters',
'platform_admin_splash_page',
'pricing',
'privacy',
'public_agreement',
'public_download_agreement',
'received_text_messages_callback',
'redact_template',
'register',
'register_from_invite',
'register_from_org_invite',
'registration_continue',
'remove_user_from_service',
'request_to_go_live',
'resend_email_link',
'resend_email_verification',
'resume_service',
'returned_letter_summary',
'returned_letters',
'returned_letters_report',
'revalidate_email_sent',
'revoke_api_key',
'roadmap',
'security',
'send_messages',
'send_notification',
'send_one_off',
'send_one_off_letter_address',
'send_one_off_step',
'send_test',
'no_cookie.send_test_preview',
'send_test_step',
'send_from_contact_list',
'send_uploaded_letter',
'service_add_email_reply_to',
'service_add_letter_contact',
'service_add_sms_sender',
'service_agreement',
Add pages to let users accept the agreement online At the moment, the process for accepting the data sharing and financial agreement is: 1. download a pdf * print it out * get someone to sign it * scan it * email it back to us * we rename the file and save it in Google Drive * we then update the organisation to say the MOU is signed * sometimes we also: * print it out and get it counter-signed * scan it again * email it back to the service Let's not do that any more. When the first service for an organisation that doesn't have the agreement in place is in the process of going live, then they should be able to accept the agreement online as part of the go live flow. This commit adds the pages that let someone do that. Where the checklist shows the agreement as **[not completed]** then they can follow a link where they can download it (as happens now). From here, they should then also be able to provide some info to accept it. The info that we need is: **Version** – because we version the agreements occasionally, we need to know which version they are accepting. It may not be the latest one if they downloaded it a while ago and it took time to be signed off **Who is accepting the agreement** – this will often be someone in the finance team, and not necessarily a team member, so we should let the person either accept as themselves, or on behalf of someone else. If it's on behalf of someone else we need to the name and email address of that person so we have that on record. Obvs if it's them accepting it themselves, we have that already (so we just store their user ID and not their name or email address). We then replay the collected info back in a sort of legally binding kind of way pulling in the organisation name too. The wording we’re using is inspired by what GOV.UK Pay have. Then there’s a big green button they can click to accept the agreement, which stores their user ID and and timestamp.
2019-06-18 14:24:29 +01:00
'service_accept_agreement',
'service_confirm_agreement',
'service_confirm_delete_email_reply_to',
'service_confirm_delete_letter_contact',
'service_confirm_delete_sms_sender',
'service_dashboard',
'service_dashboard_updates',
'service_delete_email_reply_to',
'service_delete_letter_contact',
'service_delete_sms_sender',
'service_download_agreement',
'service_edit_email_reply_to',
'service_edit_letter_contact',
'service_edit_sms_sender',
'service_email_reply_to',
'service_letter_contact_details',
'service_make_blank_default_letter_contact',
'service_name_change',
'service_name_change_confirm',
'service_preview_email_branding',
'service_preview_letter_branding',
'service_set_auth_type',
'service_set_channel',
'send_files_by_email_contact_details',
'service_set_email_branding',
'service_set_inbound_number',
'service_set_inbound_sms',
'service_set_international_sms',
'service_set_letters',
'service_set_reply_to_email',
'service_set_sms_prefix',
'service_settings',
'service_sms_senders',
'service_switch_count_as_live',
'service_switch_live',
'service_set_permission',
'service_set_broadcast_permission',
'service_verify_reply_to_address',
'service_verify_reply_to_address_updates',
'services_or_dashboard',
'set_free_sms_allowance',
'service_set_letter_branding',
'set_sender',
'set_template_sender',
'show_accounts_or_dashboard',
'sign_in',
'sign_out',
'start_job',
'start_tour',
'styleguide',
'submit_request_to_go_live',
'support',
'support_public',
'suspend_service',
'template_history',
'template_usage',
'terms',
'thanks',
'triage',
'trial_mode',
'trial_mode_new',
'trial_services',
'two_factor',
'two_factor_email',
'two_factor_email_sent',
'two_factor_email_interstitial',
'update_email_branding',
'update_letter_branding',
'upload_contact_list',
'check_contact_list',
'save_contact_list',
'contact_list',
'delete_contact_list',
'upload_letter',
'uploaded_letter_preview',
'uploaded_letters',
'uploads',
'usage',
'usage_for_all_services',
'user_information',
'user_profile',
'user_profile_email',
'user_profile_email_authenticate',
'user_profile_email_confirm',
'user_profile_mobile_number',
'user_profile_mobile_number_authenticate',
'user_profile_mobile_number_confirm',
'user_profile_name',
'user_profile_password',
'user_profile_disable_platform_admin_view',
'using_notify',
'verify',
'verify_email',
'view_job',
'view_job_csv',
'view_job_updates',
'view_jobs',
'view_letter_notification_as_preview',
'no_cookie.view_letter_template_preview',
'view_letter_upload_as_preview',
'view_notification',
'view_notification_updates',
'view_notifications',
'view_notifications_csv',
'view_provider',
'view_providers',
'view_template',
'view_template_version',
'no_cookie.view_template_version_preview',
'view_template_versions',
'guest_list',
'old_guest_list',
'who_can_use_notify',
2020-05-21 11:17:44 +01:00
'who_its_for',
'broadcast_tour',
'broadcast_dashboard',
'broadcast_dashboard_updates',
'broadcast',
'preview_broadcast_areas',
'choose_broadcast_library',
'choose_broadcast_area',
'choose_broadcast_sub_area',
'remove_broadcast_area',
'preview_broadcast_message',
'view_broadcast_message',
'approve_broadcast_message',
'reject_broadcast_message',
'cancel_broadcast_message',
}