[Checkins] SVN: PluggableAuthService/branches/rossp-access-log/ Switch to branches/1.5 to follow Plone 3.0

Ross Patterson me at rpatterson.net
Thu Sep 13 15:30:00 EDT 2007


Log message for revision 79619:
  Switch to branches/1.5 to follow Plone 3.0
  

Changed:
  U   PluggableAuthService/branches/rossp-access-log/doc/CHANGES.txt
  U   PluggableAuthService/branches/rossp-access-log/plugins/BasePlugin.py
  U   PluggableAuthService/branches/rossp-access-log/plugins/CookieAuthHelper.py
  U   PluggableAuthService/branches/rossp-access-log/plugins/tests/test_CookieAuthHelper.py
  U   PluggableAuthService/branches/rossp-access-log/version.txt

-=-
Modified: PluggableAuthService/branches/rossp-access-log/doc/CHANGES.txt
===================================================================
--- PluggableAuthService/branches/rossp-access-log/doc/CHANGES.txt	2007-09-13 17:58:57 UTC (rev 79618)
+++ PluggableAuthService/branches/rossp-access-log/doc/CHANGES.txt	2007-09-13 19:29:59 UTC (rev 79619)
@@ -1,14 +1,23 @@
 PluggableAuthService changelog
 
-  PluggableAuthService 1.6 (unreleased)
+  PluggableAuthService 1.5.1 (2007/09/11)
 
-    Features Added
+    Bugs fixed
 
-    Bugs Fixed
-  
+      - PluggableAuthService._verifyUser: changed to use exact_match to the 
+        enumerator, otherwise a user with login 'foobar' might get returned 
+        by _verifyUser for a query for login='foo' because the enumerator 
+        happened to return 'foobar' first in the results.
 
-  PluggableAuthService 1.5 (06/17/2007)
+    Others
 
+      - Add a test for manage_zmi_logout and replace a call to isImplementedBy
+        with providedBy.
+        (http://www.zope.org/Collectors/PAS/58)
+
+
+  PluggableAuthService 1.5 (2006/06/17)
+
     Features Added
 
       - Add support for property plugins returning an IPropertySheet

Modified: PluggableAuthService/branches/rossp-access-log/plugins/BasePlugin.py
===================================================================
--- PluggableAuthService/branches/rossp-access-log/plugins/BasePlugin.py	2007-09-13 17:58:57 UTC (rev 79618)
+++ PluggableAuthService/branches/rossp-access-log/plugins/BasePlugin.py	2007-09-13 19:29:59 UTC (rev 79619)
@@ -70,8 +70,8 @@
 
     security.declareProtected( ManageUsers, 'testImplements' )
     def testImplements( self, interface ):
-        """ Can't access Interface.providedBy() directly in ZPT. """
-        return interface.providedBy( self )
+        """ Can't access Interface.isImplementedBy() directly in ZPT. """
+        return interface.isImplementedBy( self )
 
     security.declareProtected( ManageUsers, 'manage_activateInterfaces' )
     def manage_activateInterfaces( self, interfaces, RESPONSE=None ):

Modified: PluggableAuthService/branches/rossp-access-log/plugins/CookieAuthHelper.py
===================================================================
--- PluggableAuthService/branches/rossp-access-log/plugins/CookieAuthHelper.py	2007-09-13 17:58:57 UTC (rev 79618)
+++ PluggableAuthService/branches/rossp-access-log/plugins/CookieAuthHelper.py	2007-09-13 19:29:59 UTC (rev 79619)
@@ -187,7 +187,7 @@
             came_from = req.get('came_from', None)
 
             if came_from is None:
-                came_from = req.get('ACTUAL_URL', '')
+                came_from = req.get('URL', '')
                 query = req.get('QUERY_STRING')
                 if query:
                     if not query.startswith('?'):
@@ -198,7 +198,7 @@
                 # must be coming through here a second time
                 # Reasons could be typos when providing credentials
                 # or a redirect loop (see below)
-                req_url = req.get('ACTUAL_URL', '')
+                req_url = req.get('URL', '')
 
                 if req_url and req_url == url:
                     # Oops... The login_form cannot be reached by the user -

Modified: PluggableAuthService/branches/rossp-access-log/plugins/tests/test_CookieAuthHelper.py
===================================================================
--- PluggableAuthService/branches/rossp-access-log/plugins/tests/test_CookieAuthHelper.py	2007-09-13 17:58:57 UTC (rev 79618)
+++ PluggableAuthService/branches/rossp-access-log/plugins/tests/test_CookieAuthHelper.py	2007-09-13 19:29:59 UTC (rev 79619)
@@ -12,13 +12,15 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-import unittest, urllib
+import unittest
 
 from Products.PluggableAuthService.tests.conformance \
      import ILoginPasswordHostExtractionPlugin_conformance
 from Products.PluggableAuthService.tests.conformance \
      import IChallengePlugin_conformance
 from Products.PluggableAuthService.tests.conformance \
+     import ICredentialsUpdatePlugin_conformance
+from Products.PluggableAuthService.tests.conformance \
      import ICredentialsResetPlugin_conformance
 
 from Products.PluggableAuthService.tests.test_PluggableAuthService \
@@ -115,10 +117,10 @@
         self.assertEqual(helper.extractCredentials(request), {})
 
     def test_challenge( self ):
+        from zExceptions import Unauthorized
         rc, root, folder, object = self._makeTree()
         response = FauxCookieResponse()
-        testURL = 'http://test'
-        request = FauxRequest(RESPONSE=response, URL=testURL, ACTUAL_URL=testURL)
+        request = FauxRequest(RESPONSE=response)
         root.REQUEST = request
 
         helper = self._makeOne().__of__(root)
@@ -126,26 +128,8 @@
         helper.challenge(request, response)
         self.assertEqual(response.status, 302)
         self.assertEqual(len(response.headers), 1)
-        self.failUnless(response.headers['Location'].endswith(urllib.quote(testURL)))
 
-    def test_challenge_with_vhm( self ):
-        rc, root, folder, object = self._makeTree()
-        response = FauxCookieResponse()
-        vhmURL = 'http://localhost/VirtualHostBase/http/test/VirtualHostRoot/xxx'
-        actualURL = 'http://test/xxx'
 
-
-        request = FauxRequest(RESPONSE=response, URL=vhmURL, ACTUAL_URL=actualURL)
-        root.REQUEST = request
-
-        helper = self._makeOne().__of__(root)
-
-        helper.challenge(request, response)
-        self.assertEqual(response.status, 302)
-        self.assertEqual(len(response.headers), 1)
-        self.failUnless(response.headers['Location'].endswith(urllib.quote(actualURL)))
-        self.failIf(response.headers['Location'].endswith(urllib.quote(vhmURL)))
-
     def test_resetCredentials( self ):
         helper = self._makeOne()
         response = FauxCookieResponse()

Modified: PluggableAuthService/branches/rossp-access-log/version.txt
===================================================================
--- PluggableAuthService/branches/rossp-access-log/version.txt	2007-09-13 17:58:57 UTC (rev 79618)
+++ PluggableAuthService/branches/rossp-access-log/version.txt	2007-09-13 19:29:59 UTC (rev 79619)
@@ -1 +1 @@
-PluggableAuthService-1.6
+PluggableAuthService-1.5.1



More information about the Checkins mailing list