28 Jul
2002
28 Jul
'02
9:39 p.m.
Paul Winkler writes:
... The problem here is that Page Templates don't have access to the DTML namespace (the _ variable), and I haven't found any other way to access SecurityCheckPermissions. It lives in lib/python/AccessControl/DTML.py and you get an authorization error if you try to get it via the modules namespace in ZPT. I do not understand why the security API is different for DTML and other parts of Zope (bad design!). Outside of DTML, you use the "SecurityManager" API:
tal:define="SecurityManager modules/AccessControl/getSecurityManager" "SecurityManager.getUser()" "SecurityManager.checkPermission(...)" .... Dieter