[Zope-Checkins] SVN: Zope/trunk/src/Products/Five/security.py - Zope 2 permissions should not be unicode
Yvo Schubbe
y.2009 at wcm-solutions.de
Sun Jul 19 05:12:26 EDT 2009
Log message for revision 101998:
- Zope 2 permissions should not be unicode
Changed:
U Zope/trunk/src/Products/Five/security.py
-=-
Modified: Zope/trunk/src/Products/Five/security.py
===================================================================
--- Zope/trunk/src/Products/Five/security.py 2009-07-19 09:12:02 UTC (rev 101997)
+++ Zope/trunk/src/Products/Five/security.py 2009-07-19 09:12:26 UTC (rev 101998)
@@ -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)
More information about the Zope-Checkins
mailing list