[Zope] SecurityCheckPermission

Dieter Maurer dieter@handshake.de
Sun, 28 Jul 2002 23:39:10 +0200


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