Commit Graph

6068 Commits

Author SHA1 Message Date
Chris Hill-Scott
cc364c87a4 Merge pull request #2292 from alphagov/require-name-branding
Require name when adding email branding
2018-09-06 15:33:45 +01:00
Chris Hill-Scott
eb1bae3046 Merge pull request #2289 from alphagov/bl.uk
Add British Library domain
2018-09-06 15:33:26 +01:00
Chris Hill-Scott
ad00b933ac Merge pull request #2288 from alphagov/kingston.gov.uk
Add Kingston Council’s domain
2018-09-06 15:33:20 +01:00
Chris Hill-Scott
1bd7df7797 Require name when adding email branding
Otherwise name can be blank and it never appears in the list, so you can’t find it again.
2018-09-06 11:53:30 +01:00
Chris Hill-Scott
d5a3ecd7d7 Add British Library domain 2018-09-05 11:22:09 +01:00
Chris Hill-Scott
2396a440f5 Add Kingston Council’s domain 2018-09-05 11:20:01 +01:00
Chris Hill-Scott
29f5a86ff6 Merge pull request #2282 from alphagov/lookup-branding-from-users-domain
Look up email branding from user’s domain
2018-09-05 10:40:30 +01:00
Chris Hill-Scott
01fdcb8998 Use NHS.UK branding is for all NHS services
Anyone choosing ‘NHS’ for their organisation type gets should get the
NHS branding. We don’t want to hard-code an ID for NHS branding anywhere
because it won’t be consistent between environments.

So instead we can say that anyone who chooses ‘NHS’ as their
organisation type should get whatever branding has `nhs.uk` as its
domain.

This allows us to easily manage the branding the same way we do other
brands, but gives us the efficiency of having it auto applied.
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
46dcaf3e54 Mark which brands are used as default on list
So that:
- we can see when a brand should be getting used as a default but isn’t
- we’re careful updating brands which will get auto-applied to new
  services
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
243fdb0260 Assign email branding based on user’s email domain
When a user creates a service we can take a pretty good guess at what
organisation they’re from.

For many organisations, especially local councils, GOV.UK branding is
not appropriate for their service. But right now every service:
- gets created with GOV.UK branding
- has to ask us to change it, even if they’ve already done so for other
  services they run

This commit starts using the `domain` field on the email branding table
to lookup what email branding to assign to a service automatically,
where we’re sure there’s a sensible default.
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
2e7ae91029 Persist canonical domain in email branding
When saving an email branding it’s possible we might not enter the
canonical domain for an organisation into the domain field. Because
we’re going to use the canonical domain to look up the brandings this
will cause a mismatch.

Rather than validate this and show an error, let’s just save the correct
thing instead. From the user’s perspective this means everything will
just work (ie a user with a given email address will automatically get
the right branding for their organisation).
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
80423dfb3f Don’t allow adding unknown domains to branding lookup
We should make sure we’re not putting typos in the branding list. We can
validate what gets entered here against our known list of public-sector
domains.
2018-09-05 10:32:43 +01:00
Chris Hill-Scott
47c9b71fa8 Add canonical domain info to agreement class
Because we alias domains (eg `foo.gsi.gov.uk` to `foo.gov.uk`, or where
a local council has multiple domains) it could be hard to look up a
brand (which has one domain field).

Therefore we need a way of getting the canonical domain from a user’s
email address, which we can later use to look up their branding.
2018-09-05 10:32:43 +01:00
Chris Hill-Scott
f72df546c8 Merge pull request #2276 from alphagov/email-branding-refinements
Put the currently selected email branding at the top of the list
2018-09-05 10:32:14 +01:00
Chris Hill-Scott
d80b735b2b Refactor some of the logic into form
It’s messy having a lot of logic in the view methods. Handling the form
stuff can be better encapsulated inside the `Form` subclass itself.
2018-09-05 10:25:39 +01:00
Chris Hill-Scott
80801d827a Put the currently selected branding top of list
There’s something that feels a bit off about not being able to see the
name of the currently-selected branding when you land on the page.

Putting it at the top also means that you can easily switch back to it
if you change your mind.
2018-09-05 10:07:36 +01:00
Chris Hill-Scott
405d459607 Merge pull request #2283 from alphagov/pyup-update-pytest-cov-2.5.1-to-2.6.0
Update pytest-cov to 2.6.0
2018-09-04 16:38:57 +01:00
Chris Hill-Scott
f387f1e6ba Merge pull request #2268 from alphagov/request-to-go-live-better-data
Make the data we get from the go live requests more useful
2018-09-04 16:25:59 +01:00
Chris Hill-Scott
b8eb7c324c Merge pull request #2279 from alphagov/cache-email-branding
Cache email branding in Redis
2018-09-04 14:51:54 +01:00
Sakis
792889846a Merge pull request #2285 from alphagov/bump-python-client
Bump python client version to 5.0.1
2018-09-04 14:27:29 +01:00
Athanasios Voutsadakis
8d32600716 Bump python client version to 5.0.1 2018-09-04 14:14:08 +01:00
pyup-bot
0bd3883378 Update pytest-cov from 2.5.1 to 2.6.0 2018-09-04 01:30:27 +01:00
Chris Hill-Scott
f4eaf0bbad Merge pull request #2272 from alphagov/pyup-update-coveralls-1.4.0-to-1.5.0
Update coveralls to 1.5.0
2018-09-03 16:20:04 +01:00
Sakis
0fb5f4afcb Merge pull request #2280 from alphagov/remove-header-check-staging
Disable paas-proxy header check on staging
2018-09-03 15:29:19 +01:00
Chris Hill-Scott
28b80856df Cache email branding in Redis
If we’re going to be referring to email branding as part of the service
creation journey then we should make sure it doesn’t slow things down
too much by adding an extra API call. Caching things in Redis is a way
of avoiding unneeded API calls.
2018-09-03 14:46:48 +01:00
Chris Hill-Scott
13f8c12963 Merge pull request #2281 from alphagov/pyxcel-0.5.9.1
Update pyexcel to 0.5.9.1
2018-09-03 14:18:40 +01:00
Chris Hill-Scott
17f5098cb1 Update pyexcel to 0.5.9.1
0.5.9 seems to have disappeared and is causing tests to fail on Jenkins.

https://github.com/pyexcel/pyexcel/compare/v0.5.9...v0.5.9.1
2018-09-03 13:53:37 +01:00
Athanasios Voutsadakis
c64433b3e7 Disable paas-proxy header check on staging
See: alphagov/notifications-api#2052
2018-09-03 11:10:58 +01:00
Chris Hill-Scott
75a48e7bc1 Merge pull request #2277 from alphagov/pyup-update-pyexcel-io-0.5.9-to-0.5.9.1
Update pyexcel-io to 0.5.9.1
2018-09-03 10:49:05 +01:00
Chris Hill-Scott
9d54a360fe Merge branch 'master' into pyup-update-pyexcel-io-0.5.9-to-0.5.9.1 2018-09-03 10:29:07 +01:00
Chris Hill-Scott
a5840e2173 Merge pull request #2278 from alphagov/pyup-update-pyexcel-xls-0.5.7-to-0.5.8
Update pyexcel-xls to 0.5.8
2018-09-03 10:23:07 +01:00
Chris Hill-Scott
c000fbc8ae Freeze requirements 2018-09-03 10:14:53 +01:00
Chris Hill-Scott
a13ea0f5f6 Freeze requirements 2018-09-03 10:13:51 +01:00
Chris Hill-Scott
28f1bcd7f3 Merge pull request #2265 from alphagov/pyup-update-pyexcel-0.5.8-to-0.5.9
Update pyexcel to 0.5.9
2018-09-03 10:00:28 +01:00
pyup-bot
8d6df5b1fd Update pyexcel-xls from 0.5.7 to 0.5.8 2018-09-03 09:56:45 +01:00
pyup-bot
c56843741f Update pyexcel-io from 0.5.9 to 0.5.9.1 2018-09-03 09:55:48 +01:00
Chris Hill-Scott
4fc585201a Merge branch 'master' into pyup-update-pyexcel-0.5.8-to-0.5.9 2018-09-03 09:52:01 +01:00
Chris Hill-Scott
18fcd05434 Merge pull request #2251 from alphagov/pyup-update-pyexcel-io-0.5.8-to-0.5.9
Update pyexcel-io to 0.5.9
2018-09-03 09:51:20 +01:00
Chris Hill-Scott
78e4929278 Merge pull request #2275 from alphagov/ignore-pytest-cache
Don’t version control Pytest cache
2018-09-03 09:41:25 +01:00
Chris Hill-Scott
7d951ad1f3 Don’t version control Pytest cache
Pytest moved its cache from `./.cache` (which is in our `.gitignore`) to
`./.pytest_cache` (which isn’t).

It’s annoying having to be careful not to commit it all the time, so
this commit makes it ignored.

See https://github.com/pytest-dev/pytest/issues/3286 for more context.
2018-09-03 09:33:04 +01:00
Chris Hill-Scott
a1e06efefe Merge pull request #2274 from alphagov/remove-service-branding-property
Remove `branding` attribute from service model
2018-08-31 14:13:57 +01:00
Chris Hill-Scott
631c3478ae Remove branding attribute from service model
To correspond with us dropping this column from the database.

Remove the attribute from the model gives us more confidence that it’s
not being used (because it will raise exceptions in any tests that refer
to it).
2018-08-31 14:05:33 +01:00
Tom Byers
3655e63d34 Merge pull request #2262 from alphagov/remove_branding_type_from_set_email_branding_page
Remove branding type from set email branding page
2018-08-31 13:56:44 +01:00
Chris Hill-Scott
d2503e8a26 Merge pull request #2266 from alphagov/remove-reference-to-service-branding
Remove reference to service branding on the settings page
2018-08-31 13:48:29 +01:00
Chris Hill-Scott
d825f09b0b Merge pull request #2273 from alphagov/explain-sms-sender
Explain text message sender
2018-08-31 11:18:22 +01:00
Chris Hill-Scott
7f458ad066 Explain text message sender
We sometimes have to do this over support tickets as part of the go-live
process; now we’re directing people to add a sender (as part of the task
list) we can explain what it is in context.
2018-08-31 10:50:59 +01:00
pyup-bot
7765f732a1 Update coveralls from 1.4.0 to 1.5.0 2018-08-31 06:33:21 +01:00
Chris Hill-Scott
810de02307 Freeze requirements 2018-08-30 17:10:59 +01:00
Chris Hill-Scott
2686f4f0e2 Freeze requirements 2018-08-30 17:08:35 +01:00
Tom Byers
d12fa00066 Update tests to allow new 'GOV.UK' label 2018-08-30 16:03:20 +01:00