forked from ScoDoc/ScoDoc
Fix logout logging
This commit is contained in:
parent
56ec2b4b42
commit
50efadf421
@ -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)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.4.54"
|
||||
SCOVERSION = "9.4.55"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user