[z3-checkins] r5211 - z3/Five/trunk
faassen at codespeak.net
faassen at codespeak.net
Mon Jun 21 19:51:44 MEST 2004
Author: faassen
Date: Mon Jun 21 19:51:43 2004
New Revision: 5211
Modified:
z3/Five/trunk/metaconfigure.py
Log:
Add some explanatory comments to a tricky section of the code.
Modified: z3/Five/trunk/metaconfigure.py
==============================================================================
--- z3/Five/trunk/metaconfigure.py (original)
+++ z3/Five/trunk/metaconfigure.py Mon Jun 21 19:51:43 2004
@@ -212,10 +212,16 @@
InitializeClass(klass)
def _getSecurity(klass):
+ # a Zope 2 class can contain some attribute that is an instance
+ # of ClassSecurityInfo. Zope 2 scans through things looking for
+ # an attribute that has the name __security_info__ first
info = vars(klass)
for k, v in info.items():
if hasattr(v, '__security_info__'):
return v
+ # we stuff the name ourselves as __security__, not security, as this
+ # could theoretically lead to name clashes, and doesn't matter for
+ # zope 2 anyway.
security = ClassSecurityInfo()
setattr(klass, '__security__', security)
return security
More information about the z3-checkins
mailing list