mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Look in organisation for whitelisted domains
At the moment we have to update a YAML file and deploy the change to get a new domain whitelisted. We already have a thing for adding new domains – the organisation stuff. This commit extends the validation to look in the `domains` table on the API if it can’t find anything in the YAML whitelist. This has the advantage of: - not having to deploy code to whitelist a new domain - forcing us to create new organisations as they come along, so that users’ services automatically get allocated to the organisation once their domain is whitelisted
This commit is contained in:
@@ -1057,6 +1057,7 @@ def test_non_gov_user_is_told_they_cant_go_live(
|
||||
api_nongov_user_active,
|
||||
mock_get_invites_for_service,
|
||||
mocker,
|
||||
mock_get_organisations,
|
||||
mock_get_service_organisation,
|
||||
):
|
||||
mocker.patch(
|
||||
@@ -1290,6 +1291,7 @@ def test_should_not_default_to_zero_if_some_fields_dont_validate(
|
||||
def test_non_gov_users_cant_request_to_go_live(
|
||||
client_request,
|
||||
api_nongov_user_active,
|
||||
mock_get_organisations,
|
||||
):
|
||||
client_request.login(api_nongov_user_active)
|
||||
client_request.post(
|
||||
|
||||
Reference in New Issue
Block a user