Set folder permissions when creating and accepting invites to services

Added a folder permissions form to the page to invite users to services.
This only shows if the service has 'edit_folder_permissions' enabled,
and all folder checkboxes are checked by default. This change means that
InviteApiClient.create_invite now sends folder_permissions through to
notifications_api (so invites get created with folder permissions).

Started passing the folder_permissions through to notifications-api when
accepting an invite. This changes UserApiClient.add_user_to_service to
send folder_permissions to notifications_api so that new users get folder
permissions when they are added to the service.
This commit is contained in:
Katie Smith
2019-03-15 14:57:39 +00:00
parent 782bd34394
commit c39f6d49ea
10 changed files with 82 additions and 24 deletions

View File

@@ -362,7 +362,7 @@ def test_returns_value_from_cache(
(service_api_client, 'delete_sms_sender', [SERVICE_ONE_ID, ''], {}),
(service_api_client, 'update_service_callback_api', [SERVICE_ONE_ID] + [''] * 4, {}),
(service_api_client, 'create_service_callback_api', [SERVICE_ONE_ID] + [''] * 3, {}),
(user_api_client, 'add_user_to_service', [SERVICE_ONE_ID, uuid4(), []], {}),
(user_api_client, 'add_user_to_service', [SERVICE_ONE_ID, uuid4(), [], []], {}),
(invite_api_client, 'accept_invite', [SERVICE_ONE_ID, uuid4()], {}),
])
def test_deletes_service_cache(