From 143f795a418bef5dcfb8419d5ce81183d8baf6a1 Mon Sep 17 00:00:00 2001
From: Ben Adida <ben@adida.net>
Date: Fri, 8 Oct 2010 19:16:25 -0700
Subject: [PATCH] fixed logout process

---
 auth/templates/login_box.html | 4 +---
 helios/views.py               | 8 +++++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/auth/templates/login_box.html b/auth/templates/login_box.html
index 2f0f735..3918f27 100644
--- a/auth/templates/login_box.html
+++ b/auth/templates/login_box.html
@@ -1,7 +1,5 @@
 {% if default_auth_system %}
-<p><a href="{% url auth.views.start system_name=default_auth_system %}?return_url={{return_url}}">
-{{default_auth_system_obj.LOGIN_MESSAGE}}
-</a></p>
+<p><a  style="font-size:1.3em; border: 1px solid #bbb; padding: 5px;" href="{% url auth.views.start system_name=default_auth_system %}?return_url={{return_url}}">{{default_auth_system_obj.LOGIN_MESSAGE}}</a></p>
 {% else %}
 {% for auth_system in enabled_auth_systems %}
 {% ifequal auth_system "password" %}
diff --git a/helios/views.py b/helios/views.py
index ac2101b..91c28ec 100644
--- a/helios/views.py
+++ b/helios/views.py
@@ -551,11 +551,13 @@ def one_election_cast_done(request, election):
   
   # local logout ensures that there's no more
   # user locally
-  if logout:
-    auth_views.do_local_logout(request)
+  # WHY DO WE COMMENT THIS OUT? because we want to force a full logout via the iframe, including
+  # from remote systems, just in case, i.e. CAS
+  # if logout:
+  #   auth_views.do_local_logout(request)
     
   # remote logout is happening asynchronously in an iframe to be modular given the logout mechanism
-  return render_template(request, 'cast_done', {'election': election, 'last_vote': votes[0], 'logout': logout})
+  return render_template(request, 'cast_done', {'election': election, 'last_vote': votes[0], 'logout': logout}, include_user=False)
 
 @election_view()
 @json
-- 
GitLab