----- Original Message ----- From: "Garito" <[EMAIL PROTECTED]>
To: <zope@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')
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.

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to