Commit Graph

5464 Commits

Author SHA1 Message Date
Rebecca Law
562facb49c Now that EmailBranding includes the brand type we do not need two separate colours. This PR removes the new colour columns. 2018-08-24 13:51:11 +01:00
Rebecca Law
44818a91e7 Merge pull request #2054 from alphagov/add-brand-type-to-email-branding
Add brand_type to EmailBranding.
2018-08-24 10:13:44 +01:00
Sakis
bcfef1990f Merge pull request #2052 from alphagov/remove-header-check-preview
Disable header check on preview
2018-08-23 17:12:25 +01:00
Rebecca Law
6c5e60f0a9 Fix merge conflicts 2018-08-23 15:04:44 +01:00
Rebecca Law
4fe1e6bb66 Merge branch 'master' into add-brand-type-to-email-branding 2018-08-23 15:02:55 +01:00
Rebecca Law
6265c63a0e Merge pull request #2053 from alphagov/pension-wise-letter-logo
Add letter logo for Pension Wise
2018-08-23 14:58:27 +01:00
Rebecca Law
f80cd508ac Fix name typo 2018-08-23 14:43:41 +01:00
Rebecca Law
3816010c72 Add brand_type to EmailBranding.
It makes more sense to put the brand_type with EmailBranding rather than in Service.
Next step is to add the new type to the form in admin app.
2018-08-23 13:53:05 +01:00
Chris Hill-Scott
a950425882 Add letter logo for Pension Wise 2018-08-23 13:38:56 +01:00
Athanasios Voutsadakis
1e4c2ee796 Disable header check on preview
This header was introduced to ensure that no traffic was being
directed straight to the .cloudapps.digital domain. This was especially
useful for the non-production environments where access to the proper
domains is allowed for specific IP addresses while the cloudapps.digital
ones are open.

Moving to paas custom domains [1] will allow us to stop using the paas
proxies and, as a result, unbind the cloudapps.digital domain from our
apps.

This means that the X-Custom-Forwarder will become obsolete since all
our requests will be coming directly to our domain (albeit through
cloudfront) so any IP restriction can be implemented with a route
service [2].

1: https://docs.cloud.service.gov.uk/deploying_services.html#set-up-a-custom-domain-using-the-cdn-route-service
2: https://docs.cloud.service.gov.uk/deploying_services.html#route-services
2018-08-23 13:23:14 +01:00
Chris Hill-Scott
c067aea68f Merge pull request #2048 from alphagov/email-colours-and-domain
Add banner_colour, single_id_color and domain to email_branding.
2018-08-22 16:04:14 +01:00
Rebecca Law
fd16d7060a Added a method to decide which colour to send to the notifications-utils HTMLEmailTemplate to create the content. 2018-08-22 12:59:06 +01:00
Rebecca Law
47892168d6 Merge pull request #2047 from alphagov/bump-utils
Bump the utils requirement.
2018-08-20 13:24:36 +01:00
Rebecca Law
0b0e551626 Add banner_colour, single_id_colour, and domain to email_branding_schema.
The Admin app can now be updated to send the new columns to update/create email_branding
2018-08-20 10:57:42 +01:00
Rebecca Law
d055fabf17 Bump the utils requirement.
This helped with some of the dependency warnings but not all.
2018-08-20 10:33:15 +01:00
Rebecca Law
1658f4de71 Merge pull request #2045 from alphagov/email-branding-colors-and-domain
New columns for EmailBranding.
2018-08-17 12:56:32 +01:00
Katie Smith
60ecb7ddce Merge pull request #2043 from alphagov/increase-sms-size
Increase SMS maximum length from 495 to 612
2018-08-17 12:13:18 +01:00
Rebecca Law
640a400165 DB update script - missing from last commit 2018-08-16 17:10:02 +01:00
Rebecca Law
df2271a49f New columns for EmailBranding.
There is a requirement for the colour of the banner to be different to the single id colour. In order to accomodate that we are adding two new columns for that data.
These columns will be updated manually and not done with a data migration.

A new column called domain has been added. This will be used as a default domain, if the user that creates the service has a matching domain this email brand will be set for the service.

This PR only adds the new columns to the model and db.

https://www.pivotaltracker.com/story/show/159660295
2018-08-16 16:57:53 +01:00
Katie Smith
a87be9b74a Use new value of SMS_CHAR_COUNT_LIMIT from utils
Admin, API and utils were all defining a value for SMS_CHAR_COUNT_LIMIT.
This value has been updated in notifications-utils to allow text
messages to be 4 fragments long and notifications-api now gets the value of
SMS_CHAR_COUNT_LIMIT from notifications-utils instead of defining it in
config.

Also updated some tests to check for the higher limit.
2018-08-16 16:34:34 +01:00
Katie Smith
85af1e7fe8 Bump utils to version 30.1.0
Bumped notifications-utils to bring in the new value for
`SMS_CHAR_COUNT_LIMIT`
2018-08-16 15:59:51 +01:00
Alexey Bezhan
025f805992 Merge pull request #2042 from alphagov/get-retention-by-type
Get service data retention by notification type
2018-08-16 12:06:51 +01:00
Alexey Bezhan
1e3004ab3a Add service stats dao tests with variable days limit 2018-08-15 11:10:16 +01:00
Tom Byers
a96db4b122 Merge pull request #2039 from alphagov/bump-utils
Bump utils to 29.3.6
2018-08-13 16:48:38 +01:00
Alexey Bezhan
ab428048b9 Add an endpoint to fetch service data retention by type
Admin app needs to get the service data retention for the specified
notification type, so to avoid iterating through the list of all
existing service data retention settings we restore the endpoint
to get the individual data retention period.
2018-08-13 16:45:57 +01:00
Alexey Bezhan
5f2724c429 Add limit_days argument to notification statistics endpoint
Allows getting notification counts for a given number of days to
support services with custom data retention periods (admin dashboard
page should still display counts for the last 7 days, while the
notifications page displays all stored notifications).
2018-08-13 16:45:57 +01:00
Rebecca Law
3e51b69df6 Merge pull request #2037 from alphagov/fix-email-branding
This PR fixes the check for the text key in the post data.
2018-08-13 15:17:02 +01:00
Rebecca Law
eb2c59a920 Merge pull request #2041 from alphagov/another-fix-for-delete-letters
Fixes to the delete letter notifications.
2018-08-13 14:28:43 +01:00
Rebecca Law
f965322f25 Fixes to the delete letter notifications.
If there are no files to delete we won't get an excpetion.
Wrap the delete file in a try/except to avoid stopping the entire task.
Fix the missing slash for the file name.
2018-08-13 14:09:51 +01:00
Rebecca Law
bffef09d3d Merge pull request #2038 from alphagov/fix-delete-s3
Fix bug with deleting the S3 file.
2018-08-13 11:49:08 +01:00
Tom Byers
a5eefe00b8 Bump utils to 29.3.6
Brings in the changes from:

https://github.com/alphagov/notifications-utils/pull/513
2018-08-13 11:48:53 +01:00
Rebecca Law
2a7f3faec9 Merge branch 'master' into fix-delete-s3 2018-08-13 11:44:44 +01:00
Rebecca Law
eb2c878edd Fix bug with deleting the S3 file.
Removed the duplicate method.
2018-08-13 11:33:19 +01:00
Rebecca Law
69ab649256 Use the EmailBranding.text for the bannder instead of the name. 2018-08-13 10:29:06 +01:00
Rebecca Law
febc6f4e23 This PR fixes the check for the text key in the post data. 2018-08-10 17:27:58 +01:00
Rebecca Law
dd4b711ba4 Merge pull request #2036 from alphagov/fix-deleted-count
Fix deleted count for logs and delete with letters that have not been sent
2018-08-10 16:53:09 +01:00
Rebecca Law
ccaa1dfeb2 Merge pull request #2034 from alphagov/remove-caseworking-permission
Remove caseworking permission
2018-08-10 16:30:50 +01:00
Rebecca Law
ebb43082d5 Deal with letters that have not been sent, this can be test letters or letters in tech-failure. 2018-08-10 16:22:25 +01:00
Rebecca Law
85a0fd3b46 Merge pull request #2031 from alphagov/fix_data_retention
Use days of retention when deleting notifications in the nightly job.
2018-08-10 15:35:42 +01:00
Rebecca Law
f844a39ea6 Move the condition outside the method, remove the notification_type variable. 2018-08-10 13:11:23 +01:00
Chris Hill-Scott
e0570c1773 Remove caseworking permission
What became ‘caseworking view’ is now available to all services.
2018-08-10 09:09:18 +01:00
Leo Hemsted
0e284701b9 Merge pull request #2028 from alphagov/requirements
bump requirements
2018-08-09 16:56:26 +01:00
Leo Hemsted
ef447931fd bump utils 2018-08-09 16:49:30 +01:00
Leo Hemsted
1ff729e75f read first file returned from s3
rather than looping through, just use `next`. We only expect to return
one file, so this won't actually affect the code flow. If, for whatever
reason, the file isn't on s3, whereas previously it would error when
trying to return an uninstantiated variable, now it will raise a
StopIteration
2018-08-09 16:47:35 +01:00
Leo Hemsted
62d70dbd4d use contextmanager freeze time instead of decorator
it doesn't appear to work nicely with pytest fixtures in the newer
versions of pytest
2018-08-09 16:47:35 +01:00
Leo Hemsted
804f489b51 bump requirements 2018-08-09 16:47:35 +01:00
Rebecca Law
d0e9ab4972 If the notifications that are being deleted are letters then we need to delete the letter from s3 as well. 2018-08-08 16:20:25 +01:00
Rebecca Law
43000b2253 Add a new test 2018-08-06 15:13:08 +01:00
Rebecca Law
517608dff5 Update method to delete notifications that are a week old, to look at the days of retention set for the service.
If the service does not have the days of retention set, then use 7 days.
Added a method to get days of retention for a service and notificaiton type
2018-08-06 13:51:54 +01:00
Rebecca Law
76be01b123 Merge pull request #2029 from alphagov/revert-1965-check-data-retention-before-purging-notifications
Revert "Purge notifications for configured days of retention"
2018-08-03 14:41:39 +01:00