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:
Katie Smith
2020-11-05 16:45:54 +00:00
parent 9ab3cb1d99
commit 1d1973050d
3 changed files with 53 additions and 0 deletions

View File

@@ -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'
)