Commit Graph

5506 Commits

Author SHA1 Message Date
Chris Hill-Scott
036974ca05 Merge pull request #2071 from alphagov/pyup-update-pytest-3.7.3-to-3.7.4
Update pytest to 3.7.4
2018-09-04 10:37:22 +01:00
Chris Hill-Scott
f1aa02f40c Merge branch 'master' into pyup-update-pytest-3.7.3-to-3.7.4 2018-09-04 10:22:12 +01:00
Chris Hill-Scott
129d45fcfd Merge pull request #2070 from alphagov/pyup-update-moto-1.3.4-to-1.3.5
Update moto to 1.3.5
2018-09-04 10:21:48 +01:00
Chris Hill-Scott
95936533e9 Merge pull request #2077 from alphagov/add-domain-constraint
Add unique constraint to email branding domain
2018-09-04 10:20:55 +01:00
Chris Hill-Scott
348461f38e Merge pull request #2074 from alphagov/pyup-update-coveralls-1.4.0-to-1.5.0
Update coveralls to 1.5.0
2018-09-04 10:20:49 +01:00
Chris Hill-Scott
f095fa1ddf Add unique constraint to email branding domain
Brandings with a domain set should be considered canonical. It doesn’t
make sense to have the same domain set on multiple different email
brands – you can’t tell which one to use.
2018-09-04 09:46:50 +01:00
Chris Hill-Scott
f39f91e0eb Merge pull request #2073 from alphagov/drop-service-branding
Drop service branding column
2018-08-31 16:35:26 +01:00
Chris Hill-Scott
834ad73304 Drop service branding column
We’re not using this column any more, so let’s clean up after ourselves.
2018-08-31 15:56:25 +01:00
Chris Hill-Scott
80de4d2ded Merge pull request #2072 from alphagov/deprecate-service-branding
Deprecate service branding and `govuk` brand type
2018-08-31 15:55:47 +01:00
pyup-bot
66431f82be Update coveralls from 1.4.0 to 1.5.0 2018-08-31 06:34:21 +01:00
Chris Hill-Scott
0c47d41977 Remove govuk from possible brands
‘GOV.UK’ doesn’t make sense as a type of brand. It only made sense as
a type of branding that a service had.

Since we’ve:
- deprecated the service branding column
- made sure it’s not used as a value in the email branding table

we can remove this value from the table of possible brand types.
2018-08-30 16:36:35 +01:00
Chris Hill-Scott
337496c5bc Deprecate service branding column
We want to drop this column. First we have to stop using it anywhere.

Needs to be made nullable so we can stop writing to it.
2018-08-30 16:05:37 +01:00
pyup-bot
e24d088683 Update pytest from 3.7.3 to 3.7.4 2018-08-29 22:33:19 +01:00
Chris Hill-Scott
6a57411fa0 Merge pull request #2069 from alphagov/email_brand_type_non_nullable
Make branding type non-nullable
2018-08-29 15:46:27 +01:00
pyup-bot
a8d011cdd3 Update moto from 1.3.4 to 1.3.5 2018-08-29 13:59:23 +01:00
Leo Hemsted
889fd796fb Merge pull request #2057 from alphagov/sanitise-precompiled
Sanitise precompiled pdfs after virus scan
2018-08-29 12:53:27 +01:00
Chris Hill-Scott
11225b7149 Make branding type non-nullable
We’ve already removed all the `null` values, and made it impossible to
add new brandings with a `null` brand type.

Making it a database constraint just gives us extra safety.
2018-08-29 12:46:21 +01:00
Chris Hill-Scott
de396ebec9 Merge pull request #2068 from alphagov/pyup-update-pytest-3.7.1-to-3.7.3
Update pytest to 3.7.3
2018-08-29 10:08:52 +01:00
pyup-bot
41b9a0891f Update pytest from 3.7.1 to 3.7.3 2018-08-29 10:00:55 +01:00
Chris Hill-Scott
ea643bef02 Merge pull request #2067 from alphagov/pyup-update-pytest-xdist-1.22.5-to-1.23.0
Update pytest-xdist to 1.23.0
2018-08-29 09:59:00 +01:00
pyup-bot
cb9966cfdf Update pytest-xdist from 1.22.5 to 1.23.0 2018-08-29 09:50:11 +01:00
Chris Hill-Scott
e5f94913a6 Merge pull request #2055 from alphagov/pyup-update-coveralls-1.3.0-to-1.4.0
Update coveralls to 1.4.0
2018-08-29 09:49:48 +01:00
Chris Hill-Scott
63519e392f Merge pull request #2035 from alphagov/pyup-update-moto-1.3.3-to-1.3.4
Update moto to 1.3.4
2018-08-29 09:49:42 +01:00
Chris Hill-Scott
38096eb93e Merge pull request #2051 from pwright08/add-create-secret-code-unit-tests
Add unit tests for the Users DAO create_secret_code function
2018-08-29 09:49:36 +01:00
Chris Hill-Scott
e9a3216295 Merge pull request #2066 from alphagov/default-email-branding-IS-null
Set branding_type to org if it’s none
2018-08-28 17:37:30 +01:00
Chris Hill-Scott
0107cdcfde Set branding_type to org if it’s none
Same as a0deef06e2 but with `is null` not
`= null` 🤦🏻
2018-08-28 17:24:14 +01:00
Chris Hill-Scott
3b1d45a4e8 Merge pull request #2065 from alphagov/nhs-letter
Add NHS logo for letters
2018-08-28 17:03:14 +01:00
Chris Hill-Scott
a71ce9fb54 Add NHS logo for letters
Matches: https://github.com/alphagov/notifications-template-preview/pull/192
2018-08-28 16:56:42 +01:00
Chris Hill-Scott
76f9b80444 Merge pull request #2064 from alphagov/look-in-branding-brand_type
Look in email_branding for brand_type, not service
2018-08-28 16:54:15 +01:00
Chris Hill-Scott
a0deef06e2 Set branding_type to org if it’s none
So later we can:
- make it non-nullable later
- remove `govuk` as an option

This is mostly for people’s local databases, the manual work here has
been done on production already.
2018-08-28 16:22:42 +01:00
Chris Hill-Scott
2671ca3e5e Look in email_branding for brand_type, not service
https://www.pivotaltracker.com/story/show/159986276

We are now setting the type of branding on the branding itself, not on
the service.

This commit switches over from looking in the old place (on the service)
to looking in the new place (on the branding).
2018-08-28 16:22:41 +01:00
Rebecca Law
a21972d7b6 Merge pull request #2059 from alphagov/remove-db-colour-columns
Remove db columns
2018-08-24 16:23:20 +01:00
Rebecca Law
a960d2fb1d Remove db columns 2018-08-24 16:09:17 +01:00
Rebecca Law
099216c414 Merge pull request #2058 from alphagov/remove-db-migration
Need to do the data migration after removing the columns in the code.
2018-08-24 16:04:55 +01:00
Rebecca Law
25c5e0ceb8 Need to do the data migration after removing the columns in the code. 2018-08-24 15:51:28 +01:00
Rebecca Law
a7aae2a5c1 Merge pull request #2056 from alphagov/remove-new-colours
Remove new colours - they are not needed
2018-08-24 15:25:07 +01:00
Leo Hemsted
40c537a9f5 add tests 2018-08-24 15:12:02 +01:00
Rebecca Law
45632293b2 Remove new colour columns 2018-08-24 13:53:04 +01:00
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
pyup-bot
ccb12dc963 Update coveralls from 1.3.0 to 1.4.0 2018-08-24 03:49:06 +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
Leo Hemsted
001f84b0b8 Sanitise PDFs after virus scan
Notify antivirus, on success, calls the process_virus_scan_passed taks.
Previously, this task would:

* update status to created (or delivered for test keys)
* copy the file from the scan bucket to either the live or test bucket
  based on the results
* delete the old file in the scan bucket

We want it to:

* download file from scan bucket
* sanitise PDF using new template-preview functionality
* if sanitise failed, set to new status "validation-failed" and save
  the pdf somewhere.
* send new pdf to live/test bucket
* update status to created (or delivered for test keys)
* delete the original file in the scan bucket

This PR does some of that:

* download file from scan bucket
* sanitise PDF using new template-preview functionality
* if sanitise failed, just log.
* send OLD pdf to live/test bucket
* update status to created (or delivered for test keys)
* delete the original file in the scan bucket

So if sanitising fails, we won't fall over and not deliver the letter,
we'll just log a message for now. If sanitise throws an unexpected
error (as opposed to a 400), we'll retry up to fifteen times (the same
as when creating a new letter). I've added the code for using the
sanitised pdf, but it's commented out for now
2018-08-23 16:16:40 +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