[Zope-dev] Preventing scripts from being called directly
Chris Withers
chris at simplistix.co.uk
Mon Aug 23 06:58:31 EDT 2004
Dario Lopez-Kästen wrote:
>
> I am trying to prevent PythonScripts from being called directly TTW.
Why?
> Is there a better way of doing this than the following code being called
> at the very begining of the script?
>
> if script.getPhysicalPath() = context.REQUEST.PUBLISHED.getPhysicalPath():
> raise "UnAuthorisedOrSimilar"
Make the scripts only viewable by Manager, and give whatever calls them
that role by Proxy.
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope-Dev
mailing list