mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 02:23:19 -04:00
Add an audit event when a service's broadcast permissions change
This adds an audit event to the `events` table when the broadcast permissions for a service (the service mode, channel or provider restriction) changes.
This commit is contained in:
@@ -41,6 +41,23 @@ def create_archive_user_event(user_id, archived_by_id):
|
||||
archived_by_id=archived_by_id)
|
||||
|
||||
|
||||
def create_broadcast_account_type_change_event(
|
||||
service_id,
|
||||
changed_by_id,
|
||||
service_mode,
|
||||
broadcast_channel,
|
||||
provider_restriction,
|
||||
):
|
||||
_send_event(
|
||||
'change_broadcast_account_type',
|
||||
service_id=service_id,
|
||||
changed_by_id=changed_by_id,
|
||||
service_mode=service_mode,
|
||||
broadcast_channel=broadcast_channel,
|
||||
provider_restriction=provider_restriction
|
||||
)
|
||||
|
||||
|
||||
def _send_event(event_type, **kwargs):
|
||||
event_data = _construct_event_data(request)
|
||||
event_data.update(kwargs)
|
||||
|
||||
Reference in New Issue
Block a user