[Zope] I don't understand why fail

Jonathan dev101 at magma.ca
Thu Mar 8 10:58:50 EST 2007


----- Original Message ----- 
From: "Garito" <garito at gmail.com>
To: <zope at zope.org>
Sent: Thursday, March 08, 2007 10:46 AM
Subject: [Zope] I don't understand why fail


> Hi all!
>
> Look at this code, please:
> Python Script CrearFuncionalidad
>
> carpeta = getattr(context.Singular(), 'Funcionalidades')
> Id = context.Dame(context.Id)
>
> args['caso'] = carpeta.manage_addProduct['Yanged'].CrearYanged(Id)
> return args
>
> Python Script BorrarFuncionalidad
>
> carpeta = getattr(context.Singular(), 'Funcionalidades')
> carpeta.manage_delObjects(args['path'])
> return args
>
> The first one (CrearFuncionalidad) works ok but the second one
> (BorrarFuncionalidad) fails and ask for login and password. If I put a 
> raise
> on BorrarFuncionalidad the user is Anonymous but when I launch
> CrearFuncionalidad the object is created correcty with my user

Assuming that the user in the first case is also Anonymous, then somehow you 
have given Anonymous users permission to use manage_addProduct, so 
'CrearFuncionalidad' works (either the security permissions are set to 
anonymous or the script file has a proxy role or you have given anonymous 
users the necessary privileges).

In the 'BorrarFuncionalidad' script your Anonymous user does not have 
'Delete Objects' permission.

I would check the security permissions settings and proxy role settings for 
both script files and for the folder that contains the objects you are 
creating/deleting and the security settings for your anonymous users.


Jonathan 



More information about the Zope mailing list