mò #á¸Ec@sYdZdklZdkZdkZdkZdkZdkZdkl Z dei _ de_ de_ de_ dei _ dfd„ƒYZ xEe iiƒD]4\ZZeddjoeei eeƒq£q£Wd klZxje iƒD]\\ZZeeƒejoeieƒZneid ƒoqõneei eeƒqõWdS( seAdd security system support to Document Templates $Id: DTML.py 40320 2005-11-22 16:08:56Z tseaver $ (sDT_UtilN(s safe_builtinsitDTMLSecurityAPIcBs2tZdZd„Zd„Zd„Zd„ZRS(sBAPI for performing security checks in DTML using '_' methods. cCstiƒi||||ƒS(sValidate access. 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. 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. N(tSecurityManagementtgetSecurityManagertvalidatetinsttparenttnametvalue(tmdRRRR((t1/data/zmath/zope/lib/python/AccessControl/DTML.pytSecurityValidate(scCstiƒi||ƒS(sêCheck whether the security context allows the given permission on the given object. Arguments: permission -- A permission name object -- The object being accessed according to the permission N(RRtcheckPermissiont permissiontobject(RR R ((R tSecurityCheckPermission?s cCstiƒiƒS(s"Gen the current authenticated userN(RRtgetUser(R((R tSecurityGetUserNscCs/tiƒiƒ}|djo |dSn|S(sUReturn a boolean value indicating if this context was called by an executableiiN(RRtcalledByExecutabletr(RR((R tSecurityCalledByExecutableUs  (t__name__t __module__t__doc__R RRR(((R R$s    it_(s FunctionTypet__(RtDocumentTemplatetDT_UtilRtstringtmathtrandomtDocumentTemplate.sequencet ZopeGuardst safe_builtinst TemplateDictt*__allow_access_to_unprotected_subobjects__tsequenceRt__dict__titemsRtvtsetattrttypest FunctionTypettypet NotBindablet startswith( RRRR RRR&R)RRR((R t?s, $       ;