[Zope-Checkins] CVS: Zope/lib/python/AccessControl - SecurityManager.py:1.6
Matthew T. Kromer
matt@zope.com
Mon, 1 Oct 2001 17:03:16 -0400
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv26651/AccessControl
Modified Files:
SecurityManager.py
Log Message:
Change DTMLMethod to call DTMLValidate, a minor performance enhancement
discovered for a media client. DTMLValidate is just validate with
different arguments -- this eliminates an argument remapping step.
=== Zope/lib/python/AccessControl/SecurityManager.py 1.5 => 1.6 ===
self._context, roles)
+ def DTMLValidate(self, accessed=None, container=None, name=None,
+ value=None,md=None):
+
+ """Validate access.
+ * THIS EXISTS FOR DTML COMPATIBILITY *
+
+ Arguments:
+
+ accessed -- the object that was being accessed
+
+ container -- the object the value was found in
+
+ name -- The name used to access the value
+
+ value -- The value retrieved though the access.
+
+ md -- multidict for DTML (ignored)
+
+ The arguments may be provided as keyword arguments. Some of these
+ arguments may be ommitted, however, the policy may reject access
+ in some cases when arguments are ommitted. It is best to provide
+ all the values possible.
+
+ """
+ policy=self._policy
+ if policy is None: policy=_defaultPolicy
+ return policy.validate(accessed, container, name, value,
+ self._context, _noroles)
+
def validateValue(self, value, roles=_noroles):
"""Convenience for common case of simple value validation.
"""