[Zope-CMF] Re: Opening files from a workflow script
Tres Seaver
tseaver at zope.com
Wed Feb 4 09:54:12 EST 2004
Bea S. wrote:
> I have modified the standard workflow, and included a script that would execute
> before the transaction. In this script, I wanted to created a file in the
> system file. What permissions should I have to do this? Because just with an
> os.open("filename", ...) I'm getting an authorizated response.
Workflow transition scripts (metatype 'Script (Python)') are
"untrusted", and therefore have *no* access to many standard Python
builtins / modules; see the "Advanced Zope Scripting" chapter of the
Zope Book:
http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ScriptingZope.stx
The simplest way to achieve what you want is to make an External Method
as a replacement for your Python Script; External Methods are "trusted"
code.
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-CMF
mailing list