mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Enforce only Platform Admin can suspend / resume
This was previously out-of-sync with the superficial restriction in the HTML [1][2]. [1]:6ac593aa5f/app/templates/views/service-settings.html (L462-L468)[2]:6ac593aa5f/app/templates/views/service-settings.html (L471)
This commit is contained in:
@@ -447,7 +447,7 @@ def archive_service(service_id):
|
||||
|
||||
|
||||
@main.route("/services/<uuid:service_id>/service-settings/suspend", methods=["GET", "POST"])
|
||||
@user_has_permissions('manage_service')
|
||||
@user_is_platform_admin
|
||||
def suspend_service(service_id):
|
||||
if request.method == 'POST':
|
||||
service_api_client.suspend_service(service_id)
|
||||
@@ -460,7 +460,7 @@ def suspend_service(service_id):
|
||||
|
||||
|
||||
@main.route("/services/<uuid:service_id>/service-settings/resume", methods=["GET", "POST"])
|
||||
@user_has_permissions('manage_service')
|
||||
@user_is_platform_admin
|
||||
def resume_service(service_id):
|
||||
if request.method == 'POST':
|
||||
service_api_client.resume_service(service_id)
|
||||
|
||||
Reference in New Issue
Block a user