[Checkins] SVN: Products.PluggableAuthService/branches/1.5/ ZODBUserManager plugin: allow unicode arguments to 'enumerateUsers'.

Tres Seaver tseaver at palladion.com
Wed Feb 6 13:20:16 EST 2008


Log message for revision 83599:
  ZODBUserManager plugin:  allow unicode arguments to 'enumerateUsers'.
  
  o See https://bugs.launchpad.net/zope-pas/+bug/189627o
  
  Prep 1.5.3 release.
  

Changed:
  U   Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/doc/CHANGES.txt
  U   Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/plugins/ZODBUserManager.py
  U   Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py
  U   Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/version.txt
  U   Products.PluggableAuthService/branches/1.5/setup.py

-=-
Modified: Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/doc/CHANGES.txt
===================================================================
--- Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/doc/CHANGES.txt	2008-02-06 18:07:35 UTC (rev 83598)
+++ Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/doc/CHANGES.txt	2008-02-06 18:20:16 UTC (rev 83599)
@@ -1,5 +1,12 @@
 PluggableAuthService changelog
 
+  PluggableAuthService 1.5.3 (2008/02/06)
+
+    Bugs Fixed
+
+      - ZODBUserManager plugin:  allow unicode arguments to 'enumerateUsers'.
+        (https://bugs.launchpad.net/zope-pas/+bug/189627)
+
   PluggableAuthService 1.5.2.1 (2007/12/07)
 
     Bugs Fixed

Modified: Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/plugins/ZODBUserManager.py
===================================================================
--- Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/plugins/ZODBUserManager.py	2008-02-06 18:07:35 UTC (rev 83598)
+++ Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/plugins/ZODBUserManager.py	2008-02-06 18:20:16 UTC (rev 83599)
@@ -139,10 +139,10 @@
         view_name = createViewName('enumerateUsers', id or login)
 
 
-        if isinstance( id, str ):
+        if isinstance( id, basestring ):
             id = [ id ]
 
-        if isinstance( login, str ):
+        if isinstance( login, basestring ):
             login = [ login ]
 
         # Look in the cache first...

Modified: Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py
===================================================================
--- Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py	2008-02-06 18:07:35 UTC (rev 83598)
+++ Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py	2008-02-06 18:20:16 UTC (rev 83599)
@@ -264,6 +264,24 @@
                                         exact_match=False )
         self.assertEqual( len( info_list ), 0 )
 
+    def test_enumerateUsers_unicode( self ):
+
+        from Products.PluggableAuthService.tests.test_PluggableAuthService \
+            import FauxRoot
+
+        root = FauxRoot()
+        zum = self._makeOne( id='partial' ).__of__( root )
+
+        ID_LIST = ( 'foo', 'bar', 'baz', 'bam' )
+
+        for id in ID_LIST:
+
+            zum.addUser( id, '%s at example.com' % id, 'password' )
+
+        info_list = zum.enumerateUsers( id = u'abc',
+                                        exact_match=False )
+        self.assertEqual( len( info_list ), 0 )
+
     def test_enumerateUsers_exact_nonesuch( self ):
 
         from Products.PluggableAuthService.tests.test_PluggableAuthService \

Modified: Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/version.txt
===================================================================
--- Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/version.txt	2008-02-06 18:07:35 UTC (rev 83598)
+++ Products.PluggableAuthService/branches/1.5/Products/PluggableAuthService/version.txt	2008-02-06 18:20:16 UTC (rev 83599)
@@ -1 +1 @@
-PluggableAuthService-1.5.2.1
+PluggableAuthService-1.5.3

Modified: Products.PluggableAuthService/branches/1.5/setup.py
===================================================================
--- Products.PluggableAuthService/branches/1.5/setup.py	2008-02-06 18:07:35 UTC (rev 83598)
+++ Products.PluggableAuthService/branches/1.5/setup.py	2008-02-06 18:20:16 UTC (rev 83599)
@@ -48,7 +48,8 @@
       include_package_data=True,
       namespace_packages=['Products'],
       zip_safe=False,
-      #install_requires=['Zope >= 2.10']
+      install_requires=['Products.PluginRegistry >= 1.1'],
+      extras_require={'exportimport': ['Products.GenericSetup >= 1.3'],
       entry_points="""
       [zope2.initialize]
       Products.PluggableAuthService = Products.PluggableAuthService:initialize



More information about the Checkins mailing list