[Zope] xml-rpc question
Ben Avery
ben@thesite.org
Tue, 29 Oct 2002 16:42:20 +0000
hi,
I'm using Zope (2.6.0, Pyth 2.1.3, Solaris 2.7) as an XML-RPC server,
and need to use the XML-RPC boolean datatype.
I have a test python script, which accepts a single-struct (dictionary)
parameter, checks a boolean value passed to it and responds with another
boolean value, but I'm having problems with importing permissions.
my script, booltest:
##parameters:=param
from xmlrpclib import True, False
if param['dead'] == True:
alive = False
else:
alive = True
return {'name': param['name'],
'alive': alive}
when I call the method from a standalone python script, testbool.py:
#!/usr/local/bin/python
s=xmlrpclib.Server("http://www.myzopeserver.com")
p1 = {'name': 'ben',
'dead': xmlrpclib.False}
res = s.test.testbool(p1)
print str(res)
I get a Zope error (bottom of stacktrace returned):
ImportError: import of "True" from "xmlrpclib" is unauthorized. You are
not allowed to access True in this context
for the security settings of the folder that booltest lives, I have set
the user to have permissions on:
access contents information
import/export objects
query
view
is this a problem with security settings on the object or container, or
something else?
can anyone help?
TIA
Ben Avery
YouthNet UK