mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 08:51:30 -05:00
Right now Notify restricts you to registering with a UK mobile number. This is because when we built the user registration stuff we couldn’t send to international mobiles. However we can send to international mobile numbers, and it’s totally reasonable to expect employees of the UK government to be working abroad, and have a foreign mobile phone – we’ve heard from one such user. In order for users of Notify to register with an international phone number, the Notify service needs to have the `international_sms` permission set. Which this service does, as a data migration.
34 lines
778 B
Python
34 lines
778 B
Python
"""empty message
|
|
|
|
Revision ID: 0117_international_sms_notify
|
|
Revises: 0116_another_letter_org
|
|
Create Date: 2017-08-29 14:09:41.042061
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '0117_international_sms_notify'
|
|
down_revision = '0116_another_letter_org'
|
|
|
|
from alembic import op
|
|
from datetime import datetime
|
|
|
|
|
|
NOTIFY_SERVICE_ID = 'd6aa2c68-a2d9-4437-ab19-3ae8eb202553'
|
|
|
|
|
|
def upgrade():
|
|
op.execute("""
|
|
INSERT INTO service_permissions VALUES
|
|
('{}', 'international_sms', '{}')
|
|
""".format(NOTIFY_SERVICE_ID, datetime.utcnow()))
|
|
|
|
|
|
def downgrade():
|
|
op.execute("""
|
|
DELETE FROM service_permissions
|
|
WHERE
|
|
service_id = '{}' AND
|
|
permission = 'international_sms'
|
|
""".format(NOTIFY_SERVICE_ID))
|