Remove platform admin toggle for basic view

Since platform admins can use the new settings page, this commit:
- links to that page
- removes the platform-admin-only endpoint that switches basic view on
  and off
This commit is contained in:
Chris Hill-Scott
2018-07-10 10:09:17 +01:00
parent 4d3a4ef9af
commit 2f40ddae20
4 changed files with 3 additions and 19 deletions

View File

@@ -323,14 +323,6 @@ def service_switch_email_auth(service_id):
return redirect(url_for('.service_settings', service_id=service_id))
@main.route("/services/<service_id>/service-settings/caseworking")
@login_required
@user_is_platform_admin
def service_switch_caseworking(service_id):
switch_service_permissions(service_id, 'caseworking')
return redirect(url_for('.service_settings', service_id=service_id))
@main.route("/services/<service_id>/service-settings/can-send-precompiled-letter")
@login_required
@user_is_platform_admin

View File

@@ -230,7 +230,6 @@ class HeaderNavigation(Navigation):
'service_switch_can_send_precompiled_letter',
'service_switch_can_upload_document',
'service_switch_can_send_sms',
'service_switch_caseworking',
'service_switch_email_auth',
'service_switch_live',
'service_switch_research_mode',
@@ -450,7 +449,6 @@ class MainNavigation(Navigation):
'service_switch_can_send_precompiled_letter',
'service_switch_can_upload_document',
'service_switch_can_send_sms',
'service_switch_caseworking',
'service_switch_email_auth',
'service_switch_live',
'service_switch_research_mode',
@@ -658,7 +656,6 @@ class CaseworkNavigation(Navigation):
'service_switch_can_send_precompiled_letter',
'service_switch_can_send_sms',
'service_switch_can_upload_document',
'service_switch_caseworking',
'service_switch_email_auth',
'service_switch_live',
'service_switch_research_mode',
@@ -880,7 +877,6 @@ class OrgNavigation(Navigation):
'service_switch_can_send_precompiled_letter',
'service_switch_can_upload_document',
'service_switch_can_send_sms',
'service_switch_caseworking',
'service_switch_email_auth',
'service_switch_live',
'service_switch_research_mode',

View File

@@ -365,8 +365,8 @@
</a>
</li>
<li class="bottom-gutter">
<a href="{{ url_for('.service_switch_caseworking', service_id=current_service.id) }}" class="button">
{{ 'Stop basic view' if 'caseworking' in current_service.permissions else 'Allow basic view' }}
<a href="{{ url_for('.service_set_basic_view', service_id=current_service.id) }}" class="button">
Set basic view
</a>
</li>
<li class="bottom-gutter">
@@ -397,3 +397,4 @@
{% endif %}
{% endblock %}
}

View File

@@ -44,11 +44,6 @@ def get_service_settings_page(
({'permissions': []},
'.service_switch_can_upload_document', {}, 'Allow to upload documents'),
({'permissions': []},
'.service_switch_caseworking', {}, 'Allow basic view'),
({'permissions': ['caseworking']},
'.service_switch_caseworking', {}, 'Stop basic view'),
({'permissions': ['sms']}, '.service_set_inbound_number', {'set_inbound_sms': True}, 'Allow inbound sms'),
({'active': True}, '.archive_service', {}, 'Archive service'),