mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 17:24:23 -04:00
Remove ‘suspend API keys’
This was an early reckon feature. There were a few of problems with it: - it worked on the service, not just on the API keys as described - it was back to front, ‘suspending’ a service set `active` to `True`, reactivating it set `active` to `False` - no part of the API actually respected the `active` flag on a service The same intent can be acheived by either: - revoking an API key - having a platform admin put your service back into trial mode So this commit removes the link and the code behind it.
This commit is contained in:
@@ -157,41 +157,6 @@ def service_switch_research_mode(service_id):
|
||||
return redirect(url_for('.service_settings', service_id=service_id))
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/service-settings/status", methods=['GET', 'POST'])
|
||||
@login_required
|
||||
@user_has_permissions('manage_settings', admin_override=True)
|
||||
def service_status_change(service_id):
|
||||
if request.method == 'GET':
|
||||
return render_template(
|
||||
'views/service-settings/status.html'
|
||||
)
|
||||
elif request.method == 'POST':
|
||||
return redirect(url_for('.service_status_change_confirm', service_id=service_id))
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/service-settings/status/confirm", methods=['GET', 'POST'])
|
||||
@login_required
|
||||
@user_has_permissions('manage_settings', admin_override=True)
|
||||
def service_status_change_confirm(service_id):
|
||||
# Validate password for form
|
||||
def _check_password(pwd):
|
||||
return user_api_client.verify_password(current_user.id, pwd)
|
||||
|
||||
form = ConfirmPasswordForm(_check_password)
|
||||
|
||||
if form.validate_on_submit():
|
||||
service_api_client.update_service(
|
||||
current_service['id'],
|
||||
active=True
|
||||
)
|
||||
return redirect(url_for('.service_settings', service_id=service_id))
|
||||
return render_template(
|
||||
'views/service-settings/confirm.html',
|
||||
heading='Turn off all outgoing notifications',
|
||||
destructive=True,
|
||||
form=form)
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/service-settings/delete", methods=['GET', 'POST'])
|
||||
@login_required
|
||||
@user_has_permissions('manage_settings', admin_override=True)
|
||||
|
||||
Reference in New Issue
Block a user