Fix logout logging

This commit is contained in:
Emmanuel Viennet 2023-02-27 23:06:11 +01:00
parent 56ec2b4b42
commit 50efadf421
2 changed files with 4 additions and 2 deletions

View File

@ -56,7 +56,9 @@ def login():
@bp.route("/logout")
def logout() -> flask.Response:
"Logout a scodoc user. If CAS session, logout from CAS. Redirect."
current_app.logger.info(f"logout user {current_user.user_name}")
if current_user:
user_name = getattr(current_user, "user_name", "anonymous")
current_app.logger.info(f"logout user {user_name}")
logout_user()
if ScoDocSiteConfig.is_cas_enabled() and flask.session.get("scodoc_cas_login_date"):
flask.session.pop("scodoc_cas_login_date", None)

View File

@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
SCOVERSION = "9.4.54"
SCOVERSION = "9.4.55"
SCONAME = "ScoDoc"