[Zope-PAS] Re: SVN:
Products.PluggableAuthService/trunk/Products/PluggableAuthService/
- plugins/ZODBRoleManager: added logging in case searchPrincipial()
Tres Seaver
tseaver at palladion.com
Thu Mar 6 11:00:47 EST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Jung wrote:
> Log message for revision 84503:
> - plugins/ZODBRoleManager: added logging in case searchPrincipial()
> returning more than one result (which might happen in case of
> having duplicate id within difference user sources)
>
>
>
> Changed:
> U Products.PluggableAuthService/trunk/Products/PluggableAuthService/doc/CHANGES.txt
> U Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/ZODBRoleManager.py
>
> -=-
> Modified: Products.PluggableAuthService/trunk/Products/PluggableAuthService/doc/CHANGES.txt
> ===================================================================
> --- Products.PluggableAuthService/trunk/Products/PluggableAuthService/doc/CHANGES.txt 2008-03-06 08:03:32 UTC (rev 84502)
> +++ Products.PluggableAuthService/trunk/Products/PluggableAuthService/doc/CHANGES.txt 2008-03-06 09:09:27 UTC (rev 84503)
> @@ -8,6 +8,12 @@
> for 'startswith' test and (if the IPy module is present) IP-range
> tests. See https://bugs.launchpad.net/zope-pas/+bug/173580 .
>
> + Bugs fixed
> +
> + - plugins/ZODBRoleManager: added logging in case searchPrincipial()
> + returning more than one result (which might happen in case of
> + having duplicate id within difference user sources)
> +
> PluggableAuthService 1.5.2 (2007/11/28)
>
> Bugs fixed
>
> Modified: Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/ZODBRoleManager.py
> ===================================================================
> --- Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/ZODBRoleManager.py 2008-03-06 08:03:32 UTC (rev 84502)
> +++ Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/ZODBRoleManager.py 2008-03-06 09:09:27 UTC (rev 84503)
> @@ -37,6 +37,10 @@
> from Products.PluggableAuthService.utils import classImplements
> from Products.PluggableAuthService.utils import postonly
>
> +import logging
> +
> +LOG = logging.getLogger('PluggableAuthService')
> +
> class IZODBRoleManager(Interface):
> """ Marker interface.
> """
> @@ -271,7 +275,10 @@
>
> parent = aq_parent( self )
> info = parent.searchPrincipals( id=k, exact_match=True )
> - assert( len( info ) in ( 0, 1 ) )
> +
> + LOG.error('searchPrincipals() returned more than one result '
> + 'id=%s' % k)
> + assert len(info) <= 1
> if len( info ) == 0:
> title = '<%s: not found>' % k
> else:
Andreas, you are logging an error no matter *what* the search returns.
This kind of change needs tests, and it needs to be "right" before
propagating to other branches.
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH0BUv+gerLs4ltQ4RAqOUAKDL9OzO9ZmTaVxUG51chg4aErqsRACg0UcE
O8wOg4/ixem++/+5N/YuZQo=
=0Dki
-----END PGP SIGNATURE-----
More information about the Zope-PAS
mailing list