ken-use-only-new-service-permissions

This commit is contained in:
Ken Tsang
2017-06-23 17:06:09 +01:00
committed by venusbb
parent 42a061cb7b
commit 98cd838510
11 changed files with 16 additions and 120 deletions

View File

@@ -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(