[open-ils-commits] r18093 - trunk/Open-ILS/xul/staff_client/chrome/content/auth (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Sep 28 17:12:17 EDT 2010


Author: phasefx
Date: 2010-09-28 17:12:11 -0400 (Tue, 28 Sep 2010)
New Revision: 18093

Modified:
   trunk/Open-ILS/xul/staff_client/chrome/content/auth/session.js
Log:
Delete all cookies on logoff.  There's dojo code that looks for stale session cookies and has the xul client prompt for a new session.  When you logoff, the session is destroyed, but the stale cookies were being left behind (and not overwritten on login? I don't understand that part).  But this fixes it


Modified: trunk/Open-ILS/xul/staff_client/chrome/content/auth/session.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/auth/session.js	2010-09-28 20:45:59 UTC (rev 18092)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/auth/session.js	2010-09-28 21:12:11 UTC (rev 18093)
@@ -115,6 +115,13 @@
     'close' : function () { 
         var obj = this;
         obj.error.sdump('D_AUTH','auth.session.close()\n'); 
+        try {
+            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+            Components.classes["@mozilla.org/cookiemanager;1"]
+                .getService(Components.interfaces.nsICookieManager).removeAll();
+        } catch(E) {
+            dump('Error in auth/session.js, close(): ' + E + '\n');
+        }
         if (obj.key) obj.network.request(
             api.AUTH_DELETE.app,
             api.AUTH_DELETE.method,



More information about the open-ils-commits mailing list