mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Merge branch 'main' of https://github.com/GSA/notifications-admin into 1484-dashboard-visualizations
This commit is contained in:
@@ -312,7 +312,7 @@ def get_status_filters(service, message_type, statistics):
|
||||
filters = [
|
||||
# key, label, option
|
||||
("requested", "total", "sending,delivered,failed"),
|
||||
("pending", "pending", "pending"),
|
||||
("pending", "pending", "sending,pending"),
|
||||
("delivered", "delivered", "delivered"),
|
||||
("failed", "failed", "failed"),
|
||||
]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
import requests
|
||||
from flask import current_app, redirect, url_for
|
||||
from flask import current_app, redirect, session, url_for
|
||||
from flask_login import current_user
|
||||
|
||||
from app.main import main
|
||||
@@ -25,12 +25,16 @@ def _sign_out_at_login_dot_gov():
|
||||
|
||||
@main.route("/sign-out", methods=(["GET", "POST"]))
|
||||
def sign_out():
|
||||
# An AnonymousUser does not have an id
|
||||
current_app.logger.info("HIT THE REGULAR SIGN OUT")
|
||||
|
||||
if current_user.is_authenticated:
|
||||
# TODO This doesn't work yet, due to problems above.
|
||||
current_user.deactivate()
|
||||
session.clear()
|
||||
current_user.sign_out()
|
||||
|
||||
session.permanent = False
|
||||
|
||||
login_dot_gov_logout_url = os.getenv("LOGIN_DOT_GOV_LOGOUT_URL")
|
||||
if login_dot_gov_logout_url:
|
||||
current_app.config["SESSION_PERMANENT"] = False
|
||||
return redirect(login_dot_gov_logout_url)
|
||||
return redirect(url_for("main.index"))
|
||||
|
||||
@@ -79,5 +79,4 @@ def activate_user(user_id):
|
||||
else:
|
||||
activated_user = user.activate()
|
||||
activated_user.login()
|
||||
|
||||
return redirect(url_for("main.add_service", first="first"))
|
||||
|
||||
Reference in New Issue
Block a user