[ZPT] CVS: Zope27/lib/python/Products/PageTemplates - Expressions.py:1.35.18.5
Fred L. Drake, Jr.
fdrake@acm.org
Tue, 17 Sep 2002 16:05:01 -0400
Update of /cvs-repository/Zope27/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv8677
Modified Files:
Tag: Zope-2_7-development-branch
Expressions.py
Log Message:
Based on an explanation and suggestion from Shane, give validate2() a
more comprehensible name.
=== Zope27/lib/python/Products/PageTemplates/Expressions.py 1.35.18.4 => 1.35.18.5 ===
--- Zope27/lib/python/Products/PageTemplates/Expressions.py:1.35.18.4 Tue Sep 17 15:24:48 2002
+++ Zope27/lib/python/Products/PageTemplates/Expressions.py Tue Sep 17 16:05:00 2002
@@ -47,7 +47,7 @@
if sys.modules.has_key('Zope'):
import AccessControl
import AccessControl.cAccessControl
- validate2 = AccessControl.cAccessControl.aq_validate
+ acquisition_security_filter = AccessControl.cAccessControl.aq_validate
from AccessControl import getSecurityManager
try:
from AccessControl import Unauthorized
@@ -66,7 +66,7 @@
except ImportError:
Unauthorized = "Unauthorized"
- def validate2(orig, inst, name, v, real_validate):
+ def acquisition_security_filter(orig, inst, name, v, real_validate):
if real_validate(orig, inst, name, v):
return 1
raise Unauthorized, name
@@ -343,7 +343,8 @@
if o is not M:
# Check access to the attribute.
if has(object, 'aq_acquire'):
- object.aq_acquire(name, validate2, validate)
+ object.aq_acquire(
+ name, acquisition_security_filter, validate)
else:
if not validate(object, object, name, o):
raise Unauthorized, name