Hi,

You probably just need to declare the access policy for your methods: private, 
protected, or public.
Have a look here: http://article.gmane.org/gmane.comp.web.zope.cps.devel/3231 
for an example, or delve into some other products files.

Best Luck,
Jonathan



De: cleroy
Date: lun. 16/04/2007 18:00
À: [email protected]
Objet : [CPS-devel] what is the best method to use an external code in  theZMI 
without security constraints?


Hello,

I have a problem of rights when I use a method of a Product in the ZMI.

The purpose is to make a method which parses an XML file and returns a list of objects.

To do that, I made a product "TransformXmlToSearchElt" and I created an instance in the ZMI.

This product contains a class "TransformXmlToSearchElt" and this class contains a method getSearchs(xmlElt) which return a list of object "SearchElt":
/
class SearchElt:
   name = None

   def __init__(self):
       pass

   def setName(name):
       self.name = name

   def getName():
       return self.Name/


When I call the method TransformXmlToSearchElt.getSearchs(xmlString) in a script (in the ZMI), a login popup appears and in the log I have the message:

"you are not allowed to access 'getName' in this context"

Does anyone have a solution for my problem?

Thanks,

Christophe



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to