Log message for revision 101997: - Zope 2 permissions should not be unicode
Changed: U Zope/branches/2.12/doc/CHANGES.rst U Zope/branches/2.12/src/Products/Five/security.py -=- Modified: Zope/branches/2.12/doc/CHANGES.rst =================================================================== --- Zope/branches/2.12/doc/CHANGES.rst 2009-07-19 09:06:41 UTC (rev 101996) +++ Zope/branches/2.12/doc/CHANGES.rst 2009-07-19 09:12:02 UTC (rev 101997) @@ -8,10 +8,18 @@ after Zope 2.12.0 b3 (unreleased) --------------------------------- +Features Added +++++++++++++++ + - Updated packages: - zope.testing = 3.7.7 +Bugs Fixed +++++++++++ + +- Five: Fixed the permissions creation feature added in Zope 2.12.0a2. + Zope 2.12.0 b3 (2009/07/15) --------------------------- Modified: Zope/branches/2.12/src/Products/Five/security.py =================================================================== --- Zope/branches/2.12/src/Products/Five/security.py 2009-07-19 09:06:41 UTC (rev 101996) +++ Zope/branches/2.12/src/Products/Five/security.py 2009-07-19 09:12:02 UTC (rev 101997) @@ -166,16 +166,17 @@ """When a new IPermission utility is registered (via the <permission /> directive), create the equivalent Zope2 style permission. """ - + global _registeredPermissions - - zope2_permission = permission.title + + # Zope 2 uses string, not unicode yet + zope2_permission = str(permission.title) roles = ('Manager',) - + if not _registeredPermissions.has_key(zope2_permission): _registeredPermissions[zope2_permission] = 1 - + Products.__ac_permissions__ += ((zope2_permission, (), roles,),) - + mangled = pname(zope2_permission) setattr(ApplicationDefaultPermissions, mangled, roles) _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins