Add audit event for suspending a service

This is particularly important for broadcast services, where a rogue
service or platform admin could launch a DoS attack by suspending a
service at a critical moment when it needs to send alerts.
This commit is contained in:
Ben Thorner
2021-07-08 15:20:24 +01:00
parent e72a260e13
commit bb4c86008a
4 changed files with 40 additions and 3 deletions

View File

@@ -67,6 +67,17 @@ def create_broadcast_account_type_change_event(
)
def create_suspend_service_event(
service_id,
suspended_by_id,
):
_send_event(
'suspend_service',
service_id=service_id,
suspended_by_id=suspended_by_id,
)
def _send_event(event_type, **kwargs):
event_data = _construct_event_data(request)
event_data.update(kwargs)