Re: [Zope-dev] Preventing scripts from being called directly

2004-08-25 Thread Dario Lopez-Kästen
Florent Guillaume wrote: The way I do it is: ##parameters=foo, bar, ..., REQUEST=None if REQUEST is not None: raise 'Unauthorized', 'Not callable TTW' I believe this is much better. I get function not accessible in restricted mode with my own solution. Thanks, /dario -- --

Re: [Zope-dev] Preventing scripts from being called directly

2004-08-24 Thread Chris Withers
Dario Lopez-Kästen wrote: because the scripts i use in conjunction with SUF and that return person information are callable as http://server/acl_users/scriptname. Oh, well those can be totally unavailable to everyone. It seems the security machinery is bypassed at that stage in the game ;-) BTW,

Re: [Zope-dev] Preventing scripts from being called directly

2004-08-24 Thread Florent Guillaume
In article [EMAIL PROTECTED] you write: Hello, I am trying to prevent PythonScripts from being called directly TTW. Is there a better way of doing this than the following code being called at the very begining of the script? if script.getPhysicalPath() =

Re: [Zope-dev] Preventing scripts from being called directly

2004-08-23 Thread Chris Withers
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

Re: [Zope-dev] Preventing scripts from being called directly

2004-08-23 Thread Dario Lopez-Kästen
Chris Withers wrote: Dario Lopez-Kästen wrote: I am trying to prevent PythonScripts from being called directly TTW. Why? because the scripts i use in conjunction with SUF and that return person information are callable as http://server/acl_users/scriptname. And the SUF API demands that the