Mikael  K wrote:
> 
> On Wed, May 12, 2010 at 6:42 PM, Andreas Jung <[email protected]> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Mikael Kermorgant wrote:
>>
>>>
>>> This script gives the error : "NameError: global name
>>> 'PersistentMapping' is not defined " (see end of script)
>>>
>>> I tried to add this at the beginning : "from Globals import
>>> PersistentMapping"
>>> But then, I got a message saying Insuficient privileges.
>>
>> PersistentMapping can only be imported from trusted code _only_ (browser
>> views, product code, package code) and _not_ through PythonScripts.
>>
>> - -aj
> 
> Thanks,
> Would you have any hint about how to get this piece of code
> transformed into trusted code ?
> A tutorial or a code placeholder where I could paste this in order to
> achieve our need would be *very* welcome :)
> 

An external method is probably the easiest option. See
http://docs.zope.org/zope2/zope2book/BasicObject.html#logic-objects-script-python-objects-and-external-methods

Laurence
-- 
View this message in context: 
http://plone.293351.n2.nabble.com/beginner-help-with-a-script-run-from-the-ZMI-tp5042046p5043453.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to