mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Don’t let broadcast re-enable other channels
When a service is switched over to broadcast it has the email, text message and letter permissions removed. And the links to switch these settings back on are hidden. This commit ensures that even if the user manually goes to the URLs for these pages, they still won’t be able to switch the other channels back on.
This commit is contained in:
@@ -696,6 +696,9 @@ def service_set_channel(service_id, channel):
|
||||
if channel not in {'email', 'sms', 'letter'}:
|
||||
abort(404)
|
||||
|
||||
if current_service.has_permission('broadcast'):
|
||||
abort(403)
|
||||
|
||||
form = ServiceSwitchChannelForm(
|
||||
channel=channel,
|
||||
enabled=current_service.has_permission(channel)
|
||||
|
||||
Reference in New Issue
Block a user