Katie Smith
ff0e655838
Merge pull request #2955 from alphagov/invite-error-msg
...
Fix error message when invitation has expired
2020-08-13 10:17:47 +01:00
Katie Smith
f47e9116d6
Delete test for Redis config in sandbox
...
We don't use separate config per environment for Redis now.
2020-08-13 09:54:03 +01:00
Katie Smith
fb36404b6c
Fix error message when invitation has expired
...
The error message for when an invitation to Notify had expired was
displaying in admin with square brackets round it because admin is not
expecting the message to be a list
(a85134ee22/app/models/user.py (L500) )
2020-08-12 18:30:00 +01:00
David McDonald
e91252ad43
Merge pull request #2952 from alphagov/turn-redis-back-on
...
Turn redis back on
2020-08-11 15:20:20 +01:00
David McDonald
2daa945ef6
Turn redis back on
2020-08-11 14:21:57 +01:00
David McDonald
1a9c9c636f
Merge pull request #2949 from alphagov/turn-redis-off
...
Turn redis off
2020-08-11 14:05:19 +01:00
David McDonald
7b6bd21f19
Turn off redis for cred rotation
...
Short turn off in all environments to enable us to rotate creds. We will
then immediately follow up with enabling it back on.
2020-08-10 10:38:56 +01:00
David McDonald
6f66a63d67
Remove unneeded hardcoding of REDIS_ENABLED
...
This keeps things consistent with the live environment and also how we
do it for the admin app where it is entirely up to environment variables
whether redis is enabled or not. This changes nothing in terms of
functionality as currently in our environment variables redis is enabled
for the API in staging.
2020-08-10 10:36:11 +01:00
Rebecca Law
7976cefc34
Merge pull request #2948 from alphagov/csv-international-letters
...
Set postage and international for letters uploaded with a CSV
2020-08-10 10:07:41 +01:00
Rebecca Law
89a8d8912a
Set postage and international for letters uploaded with a CSV
...
If the letter is outside of the United Kingdom, set the postage and international flag.
2020-08-10 09:58:49 +01:00
Rebecca Law
725ce38a06
Merge pull request #2943 from alphagov/international-postage
...
Set international postage and international flag for international letters
2020-08-10 08:22:52 +01:00
Leo Hemsted
b11e0051b7
Merge pull request #2947 from alphagov/trial-broadcast
...
allow trial mode service users to approve their own broadcasts
2020-08-06 12:17:21 +01:00
Leo Hemsted
05791f22a6
allow trial mode service users to approve their own broadcasts
...
we won't let trial mode services send real broadcasts, and it's helpful
for users to see the flow of messages without having to have a second
person with them
2020-08-06 11:15:49 +01:00
Rebecca Law
4a9f9e4b17
Remove the template_postage parameter for persist_notification
...
It was confusing to have 2 differnt postage parameters.
2020-08-06 07:35:13 +01:00
Chris Hill-Scott
c4e5123b92
Merge pull request #2942 from alphagov/remove-whitelist-urls
...
Remove whitelist from URLs
2020-08-04 14:15:36 +01:00
Chris Hill-Scott
929e1fbbdc
Remove whitelist from URLs
...
The admin app is now[1] using the newer, `…/guest-list` URLs, so we can
remove the older, deprecated, `…/whitelist` ones.
***
1. https://github.com/alphagov/notifications-admin/pull/3536
2020-08-03 17:13:26 +01:00
Chris Hill-Scott
32f5f454de
Merge pull request #2928 from alphagov/serve-on-slash-guest-list
...
Rename API URLs for guest list to guest list
2020-08-03 16:44:41 +01:00
Rebecca Law
10fe7d9fe8
Add postage for send-one-off letters.
...
The postage is set to europe or rest-of-world for international letters, otherwise the template postage is used.
Also set international for letters.
2020-08-03 14:01:59 +01:00
Rebecca Law
ed5e73d548
Set postage for templated letters when the address is not from the united-kingdom.
...
If the address is from the united-kingdom use the postage from the template.
2020-08-03 12:03:35 +01:00
Katie Smith
8e1fa6ab50
Merge pull request #2940 from alphagov/bump-eventlet
...
Bump eventlet
2020-07-31 10:51:26 +01:00
Katie Smith
baebc5bdaf
Bump eventlet
...
dnspython had been changed from 1.16.0 to 2.0.0 in a previous commit,
but this was not compatible with eventlet 0.25.2. This bumps eventlet to
a later version, which has the effect of downgrading dnspython again.
2020-07-31 10:36:09 +01:00
Katie Smith
475678a5e5
Merge pull request #2938 from alphagov/more-letter-validation
...
Check for invalid characters in letter addresses
2020-07-31 09:10:00 +01:00
Katie Smith
c9f663fe76
Check for invalid chars in letter addresses when sending through the API
...
This uses the new method in notifications-utils to validate for invalid
characters in address blocks.
2020-07-31 08:58:56 +01:00
Katie Smith
4931fc396c
Bump utils to 40.6.0
...
This brings in validation for invalid characters in address lines.
2020-07-31 08:58:56 +01:00
Rebecca Law
fbdae0ce30
Merge pull request #2937 from alphagov/indexes-for-notification_history
...
This migration will bring all environments in line with the prod
2020-07-30 08:28:35 +01:00
Rebecca Law
180ed86a27
This migration will bring all environments in line with the prod.
...
There are a few indexes that we still need to drop from prod notification_history. Indexes on prod can take too long to run in a migration so we need to run them manually.
2020-07-30 07:46:51 +01:00
Leo Hemsted
1adb460f5c
Merge pull request #2936 from alphagov/broadcast-event-model
...
add broadcast_event table
2020-07-28 15:03:20 +01:00
Chris Hill-Scott
5b1b82030d
Rename test files
...
To reflect new name of feature.
2020-07-28 12:56:48 +01:00
Chris Hill-Scott
b19451c7c6
Rename DAO file
...
To reflect new name of feature
2020-07-28 12:56:40 +01:00
Chris Hill-Scott
65346852ed
Rename variables and functions in tests
...
To reflect the new name of the feature.
2020-07-28 12:56:32 +01:00
Chris Hill-Scott
716eb67bfd
Re-label error messages
...
To reflect the new name of the feature.
2020-07-28 12:56:23 +01:00
Chris Hill-Scott
e41022214f
Rename backref to service model
...
To reflect the new name. Appears this is only used by the tests.
2020-07-28 12:56:14 +01:00
Chris Hill-Scott
083573e4dc
Rename model
...
Reflects the new name of the feature.
Note that the name of the underlying table hasn’t changed because it’s
explicitly set to `service_whitelist`. Changing this will be a more
involved process.
2020-07-28 12:56:04 +01:00
Chris Hill-Scott
4d896aa642
Rename function in service utils
...
To reflect the new name of the feature.
squash! Rename function in service utils
Rename function, variable and argument names in service utils
2020-07-28 12:55:55 +01:00
Leo Hemsted
df2ec8d99f
update comments in models.py
2020-07-28 12:10:18 +01:00
Leo Hemsted
bdf221a421
add tests for get_earlier_events_for_broadcast_event
2020-07-28 12:10:18 +01:00
Leo Hemsted
3dd15841a5
create get_dt_string_or_none string
...
mostly to quash flakle8 warnings
2020-07-28 12:10:18 +01:00
Leo Hemsted
36ae5fadf6
add broadcast_event table
...
It's clear that we need a way to track updates to a broadcast message.
It's also clear that we'll need some kind of audit log that captures
exactly what was sent out in a message.
This commit adds a new database table, `broadcast_event`, which maps 1:1
with CAP XML sent to the CBCs. We'll create one of these just before
sending out.
The main driver for this was that cancel and update messages need to
contain a list of references of all previous messages that they're
amending. This is of format `{sender},{identifier},{sent_timestamp}`,
and the identifier itself needs to be unique for each message.
2020-07-28 12:10:18 +01:00
Leo Hemsted
5dc8b43242
Merge pull request #2932 from alphagov/broadcast-crud-validation
...
Broadcast crud validation
2020-07-28 12:09:43 +01:00
Chris Hill-Scott
6384b9ef4f
Rename whitelist DAO functions
...
To reflect the new name of the feature.
2020-07-28 11:24:34 +01:00
Chris Hill-Scott
7d09599bc5
Rename methods and variables in rest.py
...
To reflect the new name of this feature.
2020-07-28 10:23:56 +01:00
Chris Hill-Scott
e9fed12a1e
Rename API URLs for guest list to guest list
...
This is a small part of removing the term ‘white list’ from the API.
Once the admin app is pointed at these new URLs, we can remove the old
ones.
2020-07-28 10:23:56 +01:00
Leo Hemsted
fb2910fb08
replace abort with raise InvalidRequest
...
it's slightly clearer that it will immediately raise an exception and
back out of the current function
2020-07-27 15:54:31 +01:00
Leo Hemsted
6302c74565
allow draft -> broadcasting
...
we haven't built pending_approval functionality yet
2020-07-27 15:51:16 +01:00
Leo Hemsted
483221df7d
add broadcast message status transition map
...
be explicit about which transitions we allow. this is not necessarily an exhaustive list of everything we'll allow
2020-07-27 15:51:16 +01:00
Leo Hemsted
4043e8fa5e
reject approvals from people outside your service
...
even if they're a platform admin
2020-07-27 15:51:16 +01:00
Leo Hemsted
b8e6689f62
allow platform admins to approve their own messages
...
makes development a lot easier. we should remove this when we go live
2020-07-27 15:51:16 +01:00
Leo Hemsted
0c870e8dcd
enforce kwargs when creating user in tests
...
spent WAY too long trying to figure out why my user wasn't being created
in tests. the user isn't created if their email already exists in the
system, but email isn't a required field when creating!
Note: I tried just removing the check to see if the user already exists,
but 16 tests try and create duplicate users. I'm of the belief we should
just fix all those tests but I didn't have the energy for it right now
2020-07-27 15:51:15 +01:00
Leo Hemsted
8af112d885
refactor status updating into its own function
...
before it gets mega complex
2020-07-27 15:51:15 +01:00
Leo Hemsted
8dda1a5123
forbid editing after broadcast message goes live
...
only allow editing while in:
* draft
* pending-approval
* rejected (not too sure if/how this'll be used, so easier to include it
for now)
2020-07-27 15:51:15 +01:00