[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/pas/browserplugins.py added transaction.commit after erasing credentials from session

robert rottermann robert at redcor.ch
Wed Oct 13 10:13:20 EDT 2004


Log message for revision 28081:
  added transaction.commit after erasing credentials from session

Changed:
  U   Zope3/trunk/src/zope/app/pas/browserplugins.py

-=-
Modified: Zope3/trunk/src/zope/app/pas/browserplugins.py
===================================================================
--- Zope3/trunk/src/zope/app/pas/browserplugins.py	2004-10-13 13:53:43 UTC (rev 28080)
+++ Zope3/trunk/src/zope/app/pas/browserplugins.py	2004-10-13 14:13:19 UTC (rev 28081)
@@ -25,6 +25,7 @@
 from zope.app.traversing.browser.absoluteurl import absoluteURL
 from zope.app import zapi
 from zope.app.session.interfaces import ISession
+import transaction 
 from urllib import urlencode
 
 from zope.app.pas.interfaces import IExtractionPlugin, IChallengePlugin
@@ -113,7 +114,7 @@
     def extractCredentials(self, request):
         """ return credentials from session, request or None """
         sessionData = ISession(request)['pas']
-        credentials = sessionData and sessionData['credentials'] or None
+        credentials = sessionData.get('credentials', None)
         if not credentials:
             # check for form data
             login = request.get('login', None)
@@ -126,6 +127,7 @@
         authrequest = request.get('authrequest', None)
         if authrequest == 'logout':
             sessionData['credentials'] = None
+            transaction.commit()
             return None
         return {'login': credentials.getLogin(),
                 'password': credentials.getPassword()}



More information about the Zope3-Checkins mailing list