Imdad Ahad
4d41da22a4
Use correct schema for dumping a notification with personalisation
2017-07-06 12:27:55 +01:00
Rebecca Law
3e45f7d71f
Refactor test so that it does not have to change every time we add a new organisation.
2017-07-06 12:27:55 +01:00
Chris Hill-Scott
1bd5e88979
Add more organisations for letter branding
...
> The logos are now ready to go on DVLA side- so far we've got:
> 001 = HM Government
> 002 = OPG
> 003 = DWP
> 004 = GEO
2017-07-06 12:27:55 +01:00
Imdad Ahad
b2651180eb
Updates:
...
* Refactor custom db script to allow passing in a specific command function
* Add script to update new Notification status
2017-07-06 12:27:54 +01:00
venusbb
bf387ae1d0
checked displayed log message
2017-06-30 10:37:21 +01:00
venusbb
a73016d984
Merge branch 'master' of https://github.com/alphagov/notifications-api into inboundsms_checkip
2017-06-30 10:30:35 +01:00
Rebecca Law
af6427eb6a
Merge pull request #1054 from alphagov/add-template-redacted-to-history-qry
...
Add redact_personalisation to TemplateSchema
2017-06-30 09:11:40 +01:00
Venus Bailey
c809a896e2
Merge pull request #1050 from alphagov/inboundsms_checkip
...
IP restriction for inbound sms test 2
2017-06-30 09:04:03 +01:00
venusbb
9348973f12
Merge branch 'master' of https://github.com/alphagov/notifications-api into inboundsms_checkip
2017-06-30 09:01:44 +01:00
Rebecca Law
49917ccafd
Add redact_personalisation to TemplateSchema
2017-06-29 18:16:03 +01:00
Leo Hemsted
362652ec47
Merge pull request #1052 from alphagov/REDACTED-migration
...
add historical redaction data
2017-06-29 13:10:16 +01:00
Leo Hemsted
c24edcf388
add historical redaction data
...
every current template gets a row in the template_redacted table -
this inserts one for any template that doesn't already have a row,
with redact set to false, the user set to NOTIFY_USER since it was
just a script, and the updated_at set to the time the script is run
2017-06-29 12:54:48 +01:00
Leo Hemsted
2f973b8af0
use created_by instead of updated_by
...
to behave in same way as other endpoints
2017-06-29 12:39:02 +01:00
venusbb
2d8048654c
deleted last check
2017-06-29 11:11:08 +01:00
Leo Hemsted
4839665270
Merge pull request #1049 from alphagov/REDACTED
...
Templates can now be [REDACTED]
2017-06-29 11:02:01 +01:00
venusbb
16571c5b3c
IP restriction for inbound sms test 2
2017-06-29 10:47:27 +01:00
Leo Hemsted
52debfb412
Load all template model relationships when archiving a service
...
Since the version classes hinge on delicately preserving the session,
we need to take lots of care to ensure that we don't accidentally flush
half-way through. By joinedloading the template_redacted beforehand,
we prevent a flush which would inadvertantly remove the Service object
from the session, while it's still waiting in line to be versioned.
2017-06-29 10:34:38 +01:00
Leo Hemsted
3a0bc01a55
fix service_delete function to clean up template_redacted objects properly
2017-06-28 17:19:53 +01:00
Leo Hemsted
3f663daafe
redacting a template now 400s if no updated_by_id supplied
2017-06-28 17:05:32 +01:00
Leo Hemsted
8ad10261ec
add tests for redact_template rest
2017-06-28 16:53:39 +01:00
Leo Hemsted
bd71ee9d02
add redact to notification with template schema.
...
So that when the admin gets notifications, the template they return
also has a "redact_personalisation" boolean attached to it. Note, it
won't do the redacting on the api - that'll be part of the admin.
Under the hood, this uses an association_proxy, which is essentially
black magic. But it proxies the `redact_personalisation` property of
`TemplateRedacted` onto the `Template` object, so that Marshmallow
can pick it up.
Note: NOT currently added to NotificationWithTemplateHistory
2017-06-28 16:15:03 +01:00
Leo Hemsted
29fc81090e
add template personalisation redaction
...
If passing in `redact_personalisation` to the template update endpoint,
we should mark that template permanently as redacted - this means that
we won't ever return the personalisation for any notifications for it.
This is to be used with templates containing one time passwords, 2FA
codes or other sensitive information that you may not want service
workers to be able to see.
This is implemented via a separate table, `template_redacted`, which
just contains when the template was redacted.
2017-06-28 15:53:08 +01:00
Venus Bailey
73e0432a69
Merge pull request #1047 from alphagov/inboundsms_checkip
...
add logs to see the IP address of the inbound sms
2017-06-26 16:47:40 +01:00
venusbb
c5cb70210e
add logs to see the IP address of the inbound sms
2017-06-26 16:15:58 +01:00
Rebecca Law
180733c1ba
Merge pull request #1046 from alphagov/fix-org-name
...
Remove name from organisation
2017-06-26 14:30:23 +01:00
Rebecca Law
096b1f8b04
Remove name from organisation
2017-06-26 14:03:02 +01:00
Rebecca Law
fe8482a570
Merge pull request #1045 from alphagov/revert-1044-add-logo-enterprise
...
Revert "Remove name from organisation"
2017-06-26 13:52:11 +01:00
Rebecca Law
49dc93d0fd
Revert "Remove name from organisation"
2017-06-26 13:52:01 +01:00
Rebecca Law
54e22b4f9b
Merge pull request #1044 from alphagov/add-logo-enterprise
...
Remove name from organisation
2017-06-26 13:25:19 +01:00
Rebecca Law
9f2b806b18
Remove name from organisation
2017-06-26 13:10:36 +01:00
Leo Hemsted
ec5bcee79e
Merge pull request #1041 from alphagov/send-notification-fix
...
ensure created_by_id is being persisted correctly
2017-06-26 12:22:23 +01:00
Rebecca Law
9b287639ce
Merge pull request #1043 from alphagov/add-logo-enterprise
...
Add organisation values for the Enterprise Europe Network.
2017-06-26 12:19:08 +01:00
Rebecca Law
4fe62ac121
Add organisation values for the Enterprise Europe Network.
2017-06-26 11:48:04 +01:00
Venus Bailey
f48a22790e
Merge pull request #1042 from alphagov/iprestrict_inboundsms
...
Iprestrict inboundsms
2017-06-26 11:27:55 +01:00
venusbb
9e9b3f39a1
Check IP address source
2017-06-26 11:08:10 +01:00
venusbb
617253dc36
Check IP address source
2017-06-26 10:24:48 +01:00
venusbb
ad0b6bd0f6
Merge branch 'master' of https://github.com/alphagov/notifications-api
2017-06-23 17:04:27 +01:00
Leo Hemsted
350133e6db
ensure created_by_id is being persisted correctly
...
(also make sure it's well tested 🎉 )
2017-06-23 15:56:47 +01:00
Chris Hill-Scott
1ba175f8a6
Merge pull request #1039 from alphagov/bump-utils-bigger-logos
...
Update utils to make DAR logo bigger
2017-06-23 14:14:28 +01:00
Rebecca Law
0b22ceb118
Merge pull request #1040 from alphagov/update-push-inbound-json
...
Update the json in the post to the service for the inbound sms.
2017-06-22 14:01:39 +01:00
Rebecca Law
5ef0450e37
Update the json in the post to the service for the inbound sms.
2017-06-22 10:15:08 +01:00
Chris Hill-Scott
1747f7c76b
Update utils
...
Depends on:
https://github.com/alphagov/notifications-utils/pull/170
Brings in these changes:
https://github.com/alphagov/notifications-utils/compare/17.1.3...make-the-logo-bigger
or when utils PR is merged
https://github.com/alphagov/notifications-utils/compare/17.1.3...17.4.0
2017-06-22 09:15:28 +01:00
Rebecca Law
e0d23f40f6
Merge pull request #1038 from alphagov/push-inbound-sms
...
Push inbound sms
2017-06-21 15:49:32 +01:00
Rebecca Law
6559da3239
Updates as per review comments
2017-06-21 15:29:55 +01:00
Leo Hemsted
c49eb36371
Merge pull request #1036 from alphagov/one-off
...
Send one off messages from new admin endpoint
2017-06-21 10:25:44 +01:00
Rebecca Law
c608f5997b
New task to send the inbound sms to the service.
...
If the service has not set the url then nothing happens.
If the request to the service url returns with 500 or greater the task is retries.
The task is created when the SMS provider post the inbound SMS.
2017-06-20 17:13:40 +01:00
Leo Hemsted
ac7665bfc6
celery test cleanup
...
* Alter config so an error will be raised if you forget to mock out a
celery call in one of your tests
* Remove an unneeded exception type that was masking errors
2017-06-20 12:06:49 +01:00
Leo Hemsted
88a479a4bb
make client request fixture args conform
2017-06-20 12:06:49 +01:00
Leo Hemsted
a1e570dea7
persist created_by_id when using the one off notification endpoint
2017-06-20 12:06:49 +01:00
Leo Hemsted
729faf579d
block one-off sms with long content counts
2017-06-20 12:06:47 +01:00