diff options
author | Frederick Muriuki Muriithi | 2025-04-05 09:25:16 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-04-05 09:27:00 -0500 |
commit | d490dccf4717c2817a2070f7354af18a6b5be825 (patch) | |
tree | 2affb8775db115fc274d261f8c262fe6f78deffc | |
parent | b7304bbd9d09f9692a9c4a3f1bd0be3e59cbb4b7 (diff) | |
download | gn-uploader-d490dccf4717c2817a2070f7354af18a6b5be825.tar.gz |
-rw-r--r-- | uploader/authorisation.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/uploader/authorisation.py b/uploader/authorisation.py index 313bc38..bc950d8 100644 --- a/uploader/authorisation.py +++ b/uploader/authorisation.py @@ -16,14 +16,12 @@ def require_login(function): @wraps(function) def __is_session_valid__(*args, **kwargs): """Check that the user is logged in and their token is valid.""" - def __clear_session__(_no_token): - session.clear_session_info() - flash("You need to be signed in.", "alert-danger big-alert") + def __alert_needs_sign_in__(_no_token): flash("You need to be signed in.", "alert alert-danger big-alert") return redirect("/") return session.user_token().either( - __clear_session__, + __alert_needs_sign_in__, lambda token: function(*args, **kwargs)) return __is_session_valid__ |