mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -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:
@@ -28,6 +28,7 @@ from app import (
|
||||
service_api_client,
|
||||
user_api_client,
|
||||
)
|
||||
from app.event_handlers import create_broadcast_account_type_change_event
|
||||
from app.extensions import zendesk_client
|
||||
from app.formatters import email_safe
|
||||
from app.main import main
|
||||
@@ -333,6 +334,13 @@ def service_set_broadcast_account_type(service_id):
|
||||
broadcast_channel=form.account_type.broadcast_channel,
|
||||
provider_restriction=form.account_type.provider_restriction
|
||||
)
|
||||
create_broadcast_account_type_change_event(
|
||||
service_id=current_service.id,
|
||||
changed_by_id=current_user.id,
|
||||
service_mode=form.account_type.service_mode,
|
||||
broadcast_channel=form.account_type.broadcast_channel,
|
||||
provider_restriction=form.account_type.provider_restriction,
|
||||
)
|
||||
|
||||
return redirect(url_for(".service_settings", service_id=service_id))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user