RE : [CPS-devel] what is the best method to use an external code in theZMI without security constraints?

Winterflood, Jonathan jonathan.winterflood at capgemini.com
Mon Apr 16 18:12:39 CEST 2007


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
À: cps-devel at lists.nuxeo.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nuxeo.com/pipermail/cps-devel/attachments/20070416/255ba975/attachment.html



This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.