[Zope-PTK] Getting the latest PTKDemo/Document.py to work with Zope 2.3.0

Jeffrey P Shell jeffrey@Digicool.com
Thu, 15 Feb 2001 11:53:29 -0500


Zope 2.3 introduced the concept of "Declarative Security", and some Portal
Content objects have started to make use of this.  However, in Zope 2.3.0,
the ClassSecurityInfo class has a small bug in it that's exposed by the
current PTKDemo/Document.py.  This bug is fixed in the CVS HEAD and
zope-2_3-branch, but will affect those using the 2.3.0 release.

The fix is a one line change, in lib/python/AccessControl/SecurityInfo.py
line 245.  Change 'tuple(roles)' to 'tuple(roles.keys())'.

This fix will be in Zope 2.3.1, which is nearing a beta release.

Index: SecurityInfo.py
===================================================================
RCS file: /cvs-repository/Zope2/lib/python/AccessControl/SecurityInfo.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -r1.7 -r1.8
245c245
<                 entry = (permission_name, tuple(names), tuple(roles))
---
>                 entry = (permission_name, tuple(names), tuple(roles.keys()))


Jeffrey P Shell, jeffrey@Digicool.com
http://www.digicool.com/ | http://www.zope.org