Please take a look at the Zope book, in the section about security
where it speaks about "trusted" and "untrusted" code.

Basically, you can access from a Python script (i.e. untrused code)
only those modules which are explicity declared so in Zope.

time module is most probably not in those modules.

Regards
Marco

On 3 Aug 2006 10:36:12 -0000, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

I'm new to Zope, though I've been writing Python for some time.  I have a fresh 
installation to which I've added a simple Python script (code below) in the 
root directory.  When I test the script through the ZMI or attempt to access it 
via the web, I get an error:

Error Type: Unauthorized
Error Value: You are not allowed to access localtime in this context

I'm logged in as a Manager and have tried setting the Proxy of the script to 
both Manager and Owner, to no avail.

Can someone please help me understand what is happening and how to fix it?

Thanks

code of the script:

import time
t=time.localtime()
print t
return printed



_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )



--
Marco Bizzarri
http://notenotturne.blogspot.com/
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to