mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
ken-use-only-new-service-permissions
This commit is contained in:
@@ -165,7 +165,7 @@ def get_notification_return_data(notification_id, notification, template):
|
||||
def _service_can_send_internationally(service, number):
|
||||
international_phone_info = get_international_phone_info(number)
|
||||
|
||||
if international_phone_info.international and not service.can_send_international_sms:
|
||||
if international_phone_info.international and 'international_sms' not in service.permissions:
|
||||
raise InvalidRequest(
|
||||
{'to': ["Cannot send to international mobile numbers"]},
|
||||
status_code=400
|
||||
|
||||
@@ -76,7 +76,7 @@ def validate_and_format_recipient(send_to, key_type, service, notification_type)
|
||||
if notification_type == SMS_TYPE:
|
||||
international_phone_info = get_international_phone_info(send_to)
|
||||
|
||||
if international_phone_info.international and not service.can_send_international_sms:
|
||||
if international_phone_info.international and 'international_sms' not in service.permissions:
|
||||
raise BadRequestError(message="Cannot send to international mobile numbers")
|
||||
|
||||
return validate_and_format_phone_number(
|
||||
|
||||
Reference in New Issue
Block a user