[Zope] I don't understand why fail

Jonathan dev101 at magma.ca
Thu Mar 8 11:40:27 EST 2007


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


> Sorry (I use Gmail and the default reply is pushed)
>
> When I try to execute BorrarFuncionalidad this error is raised:
>
> Traceback (innermost last):
>  Module ZPublisher.Publish, line 106, in publish
>  Module ZPublisher.BaseRequest, line 323, in traverse
>  Module Products.Yanged.Yanged, line 61, in __bobo_traverse__
>  Module Products.Yanged.Yanged, line 134, in __call__
>  Module Products.Yanged.Yanged, line 164, in Ejecutar
>  Module Products.Yanged.Yanged, line 118, in __call__
>  Module Products.Yanged.Yanged, line 164, in Ejecutar
>  Module Shared.DC.Scripts.Bindings, line 311, in __call__
>  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
>  Module Products.PythonScripts.PythonScript, line 325, in _exec
>  Module None, line 2, in Borrar
>   - <PythonScript at
> /sistes.net/clientes/escobarsl.com/Comandos/BorrarFuncionalidad used
> for /sistes.net/clientes/escobarsl.com/Pagina/Borrar/BorrarCaso>
>   - Line 2
> Unauthorized: You are not allowed to access 'manage_delObjects' in this 
> context
>
> And nothing is deleted. But the next I try is CrearFuncionalidad and the
> object is created but this error appears on the error log:
>
> Traceback (innermost last):
>  Module ZPublisher.Publish, line 115, in publish
>  Module ZPublisher.mapply, line 88, in mapply
>  Module ZPublisher.Publish, line 41, in call_object
>  Module Products.Yanged.Yanged, line 101, in index_html
>  Module Products.Yanged.Yanged, line 134, in __call__
>  Module Products.Yanged.Yanged, line 164, in Ejecutar
>  Module Products.Yanged.Yanged, line 134, in __call__
>  Module Products.Yanged.Yanged, line 164, in Ejecutar
>  Module Products.Yanged.Yanged, line 134, in __call__
>  Module Products.Yanged.Yanged, line 164, in Ejecutar
>  Module Products.Yanged.Yanged, line 118, in __call__
>  Module Products.Yanged.Yanged, line 164, in Ejecutar
>  Module Shared.DC.Scripts.Bindings, line 311, in __call__
>  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
>  Module Products.PythonScripts.PythonScript, line 325, in _exec
>  Module None, line 4, in CrearFuncionalidad
>   - <PythonScript at
> /sistes.net/clientes/escobarsl.com/Comandos/CrearFuncionalidad used
> for 
> /sistes.net/clientes/escobarsl.com/Pagina/Editar/SiNoHayErrores/SiNoHayCaso/CrearCaso>
>   - Line 4
> Unauthorized: You are not allowed to access 'CrearYanged' in this context
>
>
> But THE OBJECT IS CREATED!

So the question isn't "why does the manage_delObjects fail" (this script 
should fail for an Anonymous user), but the real question is why is an 
object created when you are getting an Unauthorized error in 
'CrearFuncionalidad'.

If you really are getting an object created in the same transaction that 
raises the 'Unauthorized' error, then the only thing I can think of is that 
the 'Yanged' product is trapping the error, adding/committing the object 
anyway, and then re-raising the Unauthorized error afterwards... but this 
would be a very very unusual thing to do.

Jonathan



More information about the Zope mailing list