mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 17:45:32 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user