diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html
index 3e5d8b2bd..ae5f65e17 100644
--- a/app/templates/main_nav.html
+++ b/app/templates/main_nav.html
@@ -11,15 +11,17 @@
{% if not current_user.has_permissions('view_activity') %}
Sent messages
{% endif %}
- Uploads
+ {% if not current_service.has_permission('broadcast') %}
+ Uploads
+ {% endif %}
Team members
- {% if current_user.has_permissions('manage_service', allow_org_user=True) %}
+ {% if current_user.has_permissions('manage_service', allow_org_user=True) and not current_service.has_permission('broadcast') %}
Usage
{% endif %}
{% if current_user.has_permissions('manage_api_keys', 'manage_service') %}
Settings
{% endif %}
- {% if current_user.has_permissions('manage_api_keys') %}
+ {% if current_user.has_permissions('manage_api_keys') and not current_service.has_permission('broadcast') %}
API integration
{% endif %}
{% elif current_user.has_permissions(allow_org_user=True) %}
diff --git a/tests/app/test_navigation.py b/tests/app/test_navigation.py
index 14b95212c..92507b07b 100644
--- a/tests/app/test_navigation.py
+++ b/tests/app/test_navigation.py
@@ -177,6 +177,24 @@ def test_navigation_urls(
]
+def test_navigation_for_services_with_broadcast_permission(
+ client_request,
+ service_one,
+ mock_get_service_templates,
+ mock_get_template_folders,
+):
+ service_one['permissions'] += ['broadcast']
+ page = client_request.get('main.choose_template', service_id=SERVICE_ONE_ID)
+ assert [
+ a['href'] for a in page.select('.navigation a')
+ ] == [
+ '/services/{}'.format(SERVICE_ONE_ID),
+ '/services/{}/templates'.format(SERVICE_ONE_ID),
+ '/services/{}/users'.format(SERVICE_ONE_ID),
+ '/services/{}/service-settings'.format(SERVICE_ONE_ID),
+ ]
+
+
def test_caseworkers_get_caseworking_navigation(
client_request,
mocker,