> Make the header bar red
>
> Red for admin is a good reckon.
– 286fc308d9 (part of https://github.com/alphagov/notifications-admin/pull/130)
Starting to think it’s not such a good reckon. Users could take a guess
at what it meant, but they often guessed wrong.
However, changing the colour of the header bar _is_ useful for us
internally to see which environment we’re in. So this commit makes three
changes:
1. On live, the header bar is always standard GOV.UK blue
2. On other environments, the header bar is some other colour (local is
very different, staging and preview are related colours)
3. If an enviroment has a different header colour, it has it even when
you’re not logged in.
While test messages technically have a file and are a job, there’s not
much reason to ever revisit them. So all they end up doing is cluttering
the dashboard and making it harder to find the actual files you’ve
actually uploaded from your computer.
So this commit:
- abstracts the name of test messages into config
- filters out any files whose filename represents a test message
- adds some more thorough tests for the jobs on the dashboard
when visited sends sms code for second step of account verification.
At that second step user enters just sms code sent to users mobile
number.
Also moved dao calls that simply proxied calls to client to calling
client directly.
There is still a place where a user will be a sent a code for
verification to their email namely if they update email address.
- no config overrides - now all set in environment
- use different files for staging and live too allow for differently named env variables
- updates to run_app and run_tests scripts to set correct environment (test/development) so correct config picked up
- use environment file on deployed environments to pick correct config
We only want static files to not come from the browser cache when they have
changed. The best way to do this is by cache busting the URLs.
Otherwise, we want static files to be cached for a long time. This commit sets
the `Expires` HTTP header to 1 year in the future.
Previously it was set to 12 hours, the default.
From the Flask docs:
> Default cache control max age to use with send_static_file() (the default
> static file handler) and send_file(), in seconds. Override this value on a
> per-file basis using the get_send_file_max_age() hook on Flask or Blueprint,
> respectively. Defaults to 43200 (12 hours).