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
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
Leo Hemsted
403885722e
trigger send_broadcast_message task when user approves
...
lets leave the cancellation can of worms alone for now
2020-07-09 18:23:30 +01:00
Leo Hemsted
6b5e2af497
set finishes_at correctly
...
whoops
2020-07-09 15:36:08 +01:00
Leo Hemsted
efa2e75e56
add broadcast message tests
...
sorry for big unhelpful test commit
2020-07-09 14:19:58 +01:00