about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--uploader/authorisation.py6
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__