mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 08:16:51 -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'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user