Sorry the gmail response send only to the original poster not to the list (sorry Andreas)<br>The original post:<br><br>The question then (sorry):<br>I have a product called Yanged<br>This product has overrided:<br>__bobo_traverse__ who returns some objects and sometime a wrapper object with the HTML code to the browser
<br>__call__ who returns the HTML code to __bobo_traverse__ or if you call the object itself
<br>index_html who returns __call__<br>A TALES evaluator to evaluate some TALES expresion out of page templates<br><br>All
works ok except when I try to delete some objects. When I try to launch
the delete method I raises an authorized error and ask for new login
and password
<br><br>I try with my user who is manager and owner but logon doesn&#39;t work and raises the same error<br><br>If I look the error log I could see this error:<br><br><pre>Traceback (innermost last):<br>  Module ZPublisher.Publish
<br>, line 106, in publish<br>  Module ZPublisher.BaseRequest, line 323, in traverse<br>  Module Products.Yanged.Yanged, line 61, in __bobo_traverse__<br>  Module Products.Yanged.Yanged, line 141, in __call__<br>  Module 
Products.Yanged.Yanged<br>, line 170, in Ejecutar<br>  Module Products.Yanged.Yanged, line 125, in __call__<br>  Module Products.Yanged.Yanged, line 170, in Ejecutar<br>  Module Shared.DC.Scripts.Bindings, line 311, in __call__
<br>  Module Shared.DC.Scripts.Bindings<br>, line 348, in _bindAndExec<br>  Module Products.PythonScripts.PythonScript, line 325, in _exec<br>  Module None, line 2, in BorrarFuncionalidad<br>   - &lt;PythonScript at /sistes.net/clientes/escobarsl.com/Comandos/BorrarFuncionalidad used for /sistes.net/clientes/escobarsl.com/Pagina/Borrar/BorrarCaso&gt;
<br><br>   - Line 2<br>  Module AccessControl.ImplPython, line 729, in guarded_getattr<br>  Module AccessControl.ImplPython, line 671, in aq_validate<br>  Module AccessControl.ImplPython, line 565, in validate<br>  Module 
AccessControl.ImplPython<br>, line 463, in validate<br>  Module AccessControl.ImplPython, line 810, in raiseVerbose<br>Unauthorized: Your user account does not have the required permission.  Access to &#39;manage_delObjects&#39; of (Yanged at /sistes.net/clientes/escobarsl.com/Pagina/Funcionalidades) denied. Your user account, Anonymous User, exists at (unknown). Access requires one of the following roles: [&#39;Manager&#39;]. Your roles in this context are [&#39;Anonymous&#39;].
<br><br></pre>If I try to delete the object the error is raised but if <span>immediately I try to create another object works ok<br><br>This
are the code about BorrarFuncionalidad (the code who raises the error)
and CrearFuncionalidad (the code that works ok). Both are Python
Scripts:
<br><br>BorrarFuncinalidad<br></span>carpeta = getattr(context.Singular(), &#39;Funcionalidades&#39;)<br>carpeta.manage_delObjects(args[&#39;path&#39;])<br>return args<br><br>CrearFuncionalidad<br>carpeta = getattr(context.Singular

(), &#39;Funcionalidades&#39;)<br>Id = context.Dame(context.Id)<br><br>args[&#39;caso&#39;] = carpeta.manage_addProduct[&#39;Yanged&#39;].CrearYanged(Id)<br>return args<br><br>Both scripts are launched in the same way (the Ejecutar method you could see at the traceback above)
<br><br>I try to track the user from the __bobo_traverse__ to the
__call__ and seems the user credentials are lost when I call
CrearFuncionalidad (in the whole call)<br><br>Can you point me some clues to solve this problem?
<br><br>Thanks!<br><br><div><span class="gmail_quote">2007/3/12, Dennis Allison &lt;<a href="mailto:allison@shasta.stanford.edu">allison@shasta.stanford.edu</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>I did not catch the original post and so don&#39;t know any of the details,<br>but it sounds like a problem with the logging system, not a loss of<br>credentials.&nbsp;&nbsp;We had long ago and resolved with the list&#39;s help.&nbsp;&nbsp;This
<br>patch is still in use with Zope 2.9.X.<br><br>You need to patch ../lib/python/ZServer/medusa/http_server.py<br><br>--- ./v0.0/http_server.py&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2004-12-25 22:39:31.000000000 -0800<br>+++ ./v0.1/http_server.py&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2004-12-25 22:39:
31.000000000 -0800<br>@@ -36,6 +36,9 @@<br> from counter import counter<br> from urllib import unquote<br><br>+# Paul&#39;s Patch (a shameful thing) to make names register properly<br>+from ZPublisher.HTTPRequest import parse_cookie
<br>+<br> #<br>===========================================================================<br> #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Request Object<br> #<br>===========================================================================
<br>@@ -277,6 +280,7 @@<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auth=self.get_header(&#39;Authorization&#39;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&#39;Anonymous&#39;<br>+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if auth is not None:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if string.lower(auth[:6]) == &#39;basic &#39;:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try: decoded=base64.decodestring(auth[6:])<br>@@ -286,10 +290,35 @@<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name = &#39;Unknown (bad auth string)&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if header_value:<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parse_cookie(header_value, cookies)<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cookie = cookies.get(auth_cookie_name, None)<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except:
<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name = &#39;Anonymous&#39;<br>+<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if cookie is not None:<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cookie = unquote(cookie)<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try:<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cookie = base64.decodestring
(cookie)<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name, password = tuple( cookie.split(&#39;:&#39;,1))<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except: name= &quot;Unknown (bad auth cookie)&quot;<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except:<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name = &quot;Failure!&quot;
<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# end of patch<br><br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # log the host domain too<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.channel.server.logger.log (<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.channel.addr[0],<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;- %s [%s] &quot;%s&quot; %d %d &quot;%s&quot; &quot;%s&quot;\n&#39; % (
<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;%s %s [%s] &quot;%s&quot; %d %d &quot;%s&quot; &quot;%s&quot;\n&#39; % (<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.get_header(&#39;Host&#39;),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.log_date_string (time.time
()),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.request,<br><br>Hope this helps.<br><br><br><br>On Mon, 12 Mar 2007, Garito wrote:<br><br>&gt; Could any charitable soul take pity on this poor sinner, please...?<br>&gt;<br>&gt; 2007/3/12, Garito &lt;
<a href="mailto:garito@gmail.com">garito@gmail.com</a>&gt;:<br>&gt; &gt;<br>&gt; &gt; Hi Andreas!<br>&gt; &gt; What kind of information do you need?<br>&gt; &gt; On my last messages to the list I send the tracebacks and some other
<br>&gt; &gt; information (need to resend them?)<br>&gt; &gt;<br>&gt; &gt; Could you point me what details do you need?<br>&gt; &gt;<br>&gt; &gt; Thank you so much for you interest!<br>&gt; &gt;<br>&gt; &gt; 2007/3/12, Andreas Jung &lt;
<a href="mailto:lists@zopyx.com">lists@zopyx.com</a>&gt;:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; --On 12. März 2007 04:04:31 +0100 Garito &lt;<a href="mailto:garito@gmail.com">garito@gmail.com
</a>&gt; wrote:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; Hi all!<br>&gt; &gt; &gt; &gt; Some days ago I send to the list a question about a problem losting<br>&gt; &gt; &gt; user<br>&gt; &gt; &gt; &gt; credentials<br>&gt; &gt; &gt; &gt;
<br>&gt; &gt; &gt; &gt; In my code I don&#39;t use nothing about security and nothing is changed<br>&gt; &gt; &gt; on<br>&gt; &gt; &gt; &gt; zmi&#39;s security tab<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; But when I launch a method (Borrar if you remember) the user who
<br>&gt; &gt; &gt; launches<br>&gt; &gt; &gt; &gt; the action is anonymous not the logged one<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Somewhat hard to believe without a detailed description....<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; -aj
<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; --<br>&gt; &gt; Mis Cosas: <a href="http://blogs.sistes.net/Garito">http://blogs.sistes.net/Garito</a><br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>
<br>--<br><br></blockquote></div><br><br clear="all"><br>-- <br>Mis Cosas: <a href="http://blogs.sistes.net/Garito">http://blogs.sistes.net/Garito</a>