mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
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:
@@ -323,14 +323,6 @@ def service_switch_email_auth(service_id):
|
|||||||
return redirect(url_for('.service_settings', service_id=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")
|
@main.route("/services/<service_id>/service-settings/can-send-precompiled-letter")
|
||||||
@login_required
|
@login_required
|
||||||
@user_is_platform_admin
|
@user_is_platform_admin
|
||||||
|
|||||||
@@ -230,7 +230,6 @@ class HeaderNavigation(Navigation):
|
|||||||
'service_switch_can_send_precompiled_letter',
|
'service_switch_can_send_precompiled_letter',
|
||||||
'service_switch_can_upload_document',
|
'service_switch_can_upload_document',
|
||||||
'service_switch_can_send_sms',
|
'service_switch_can_send_sms',
|
||||||
'service_switch_caseworking',
|
|
||||||
'service_switch_email_auth',
|
'service_switch_email_auth',
|
||||||
'service_switch_live',
|
'service_switch_live',
|
||||||
'service_switch_research_mode',
|
'service_switch_research_mode',
|
||||||
@@ -450,7 +449,6 @@ class MainNavigation(Navigation):
|
|||||||
'service_switch_can_send_precompiled_letter',
|
'service_switch_can_send_precompiled_letter',
|
||||||
'service_switch_can_upload_document',
|
'service_switch_can_upload_document',
|
||||||
'service_switch_can_send_sms',
|
'service_switch_can_send_sms',
|
||||||
'service_switch_caseworking',
|
|
||||||
'service_switch_email_auth',
|
'service_switch_email_auth',
|
||||||
'service_switch_live',
|
'service_switch_live',
|
||||||
'service_switch_research_mode',
|
'service_switch_research_mode',
|
||||||
@@ -658,7 +656,6 @@ class CaseworkNavigation(Navigation):
|
|||||||
'service_switch_can_send_precompiled_letter',
|
'service_switch_can_send_precompiled_letter',
|
||||||
'service_switch_can_send_sms',
|
'service_switch_can_send_sms',
|
||||||
'service_switch_can_upload_document',
|
'service_switch_can_upload_document',
|
||||||
'service_switch_caseworking',
|
|
||||||
'service_switch_email_auth',
|
'service_switch_email_auth',
|
||||||
'service_switch_live',
|
'service_switch_live',
|
||||||
'service_switch_research_mode',
|
'service_switch_research_mode',
|
||||||
@@ -880,7 +877,6 @@ class OrgNavigation(Navigation):
|
|||||||
'service_switch_can_send_precompiled_letter',
|
'service_switch_can_send_precompiled_letter',
|
||||||
'service_switch_can_upload_document',
|
'service_switch_can_upload_document',
|
||||||
'service_switch_can_send_sms',
|
'service_switch_can_send_sms',
|
||||||
'service_switch_caseworking',
|
|
||||||
'service_switch_email_auth',
|
'service_switch_email_auth',
|
||||||
'service_switch_live',
|
'service_switch_live',
|
||||||
'service_switch_research_mode',
|
'service_switch_research_mode',
|
||||||
|
|||||||
@@ -365,8 +365,8 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="bottom-gutter">
|
<li class="bottom-gutter">
|
||||||
<a href="{{ url_for('.service_switch_caseworking', service_id=current_service.id) }}" class="button">
|
<a href="{{ url_for('.service_set_basic_view', service_id=current_service.id) }}" class="button">
|
||||||
{{ 'Stop basic view' if 'caseworking' in current_service.permissions else 'Allow basic view' }}
|
Set basic view
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="bottom-gutter">
|
<li class="bottom-gutter">
|
||||||
@@ -397,3 +397,4 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
}
|
||||||
|
|||||||
@@ -44,11 +44,6 @@ def get_service_settings_page(
|
|||||||
({'permissions': []},
|
({'permissions': []},
|
||||||
'.service_switch_can_upload_document', {}, 'Allow to upload documents'),
|
'.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'),
|
({'permissions': ['sms']}, '.service_set_inbound_number', {'set_inbound_sms': True}, 'Allow inbound sms'),
|
||||||
|
|
||||||
({'active': True}, '.archive_service', {}, 'Archive service'),
|
({'active': True}, '.archive_service', {}, 'Archive service'),
|
||||||
|
|||||||
Reference in New Issue
Block a user