mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Stop live services requesting to go live
Live services shouldn't be able to request to go live again. Once a service is live we remove the option to go live from the Settings page, but we still link to the page to request to go live from other places e.g. the 'Get started' page. As a result, we've seen some services make another request to go live when their service has already been live for months - this change will stop that from happening.
This commit is contained in:
@@ -187,6 +187,9 @@ def estimate_usage(service_id):
|
||||
@main.route("/services/<uuid:service_id>/service-settings/request-to-go-live", methods=['GET'])
|
||||
@user_has_permissions('manage_service')
|
||||
def request_to_go_live(service_id):
|
||||
if current_service.live:
|
||||
return render_template('views/service-settings/service-already-live.html')
|
||||
|
||||
return render_template(
|
||||
'views/service-settings/request-to-go-live.html'
|
||||
)
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Your service is already live
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-full">
|
||||
{{ page_header('Your service is already live') }}
|
||||
|
||||
<p class="govuk-body">
|
||||
{% if current_service.go_live_at %}
|
||||
‘{{ current_service.name }}’ went live on {{ current_service.go_live_at | format_date_normal }}.
|
||||
{% else %}
|
||||
‘{{ current_service.name }}’ is already live.
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<p class="govuk-body">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.choose_account') }}">Switch service</a>
|
||||
if you want to make a different service live.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user