[Zope] ImportError: import unauthorized

Vitaly Markitantov vm@cit.sh
Mon, 15 Apr 2002 16:08:02 +0300


I creates some Script(P7ython) in Zope:

 import time.strftime, time.strptime
 # ...

 BDate=strftime("%d.%m.%Y",strptime(Person['Birthday'],"%Y-%m-%d"))
 # ...

all looks ok

But when script is executing, i have error message:

___
Site Error

An error was encountered while publishing this resource.

ImportError
Sorry, a site error occurred.

Traceback (innermost last):
 ......
  File /usr/www/Zope/lib/python/Shared/DC/Scripts/Bindings.py, line 342, in _bindAndExec
  (Object: View)
  File /usr/www/Zope/lib/python/Products/PythonScripts/PythonScript.py, line 326, in _exec
  (Object: View)
  (Info: ({'script': <PythonScript instance at 89f2620>, 'context': <Folder instance at 89f2a80>, 'container': <Folder instance at 89f2a80>, 'traverse_subpath': []}, (), {}, None))
  File Script (Python), line 1, in View
  (Object: guard)
  File /usr/www/Zope/lib/python/AccessControl/ZopeGuards.py, line 188, in guarded_import
  ImportError: import of "time.strftime" is unauthorized
___

Why it's unauthorised? I run it from manager interface - my role in Zope is Manager
How can i resolve this problem? 

-- 
 Vitaly Markitantov         mailto: vm@cit.sh
     icq: 117438950          phone: 332-23-90