<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thank you, Miguel! If I could speak Spanish, I would thank you a
million times in Spanish!<br>
<br>
This works like a charm!<br>
<br>
On 08/08/2011 16:13, Miguel Beltran R. wrote:
<blockquote
cite="mid:CAEc04cpLAc=h-nAgC+1tNOJfQDxnZqHSt8G3EGeVz28y1-zp-Q@mail.gmail.com"
type="cite"><br>
<br>
<div class="gmail_quote">2011/8/7 paul <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:paul@aptrackers.com">paul@aptrackers.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
I was wondering whether there's an easier way to do this.<br>
<br>
Currently, whenever I use the grok UI manager interface, my
grok instance remains logged in as manager- so my app PAU
instance detects a valid login and doesn't allow me to log
out. I can log out my own users at application level, but
since the 'manager' identity is not managed by my own PAU
instance, I cannot seem to log out manager.<br>
<br>
Currently, I clear the zope session cookie, close the browser
tab, and reload the URL to clear the login. I'm sure there's
an easier way, but after much searching through the web online
docs and the zope implementation code, I'm blowed if I know
what it is.<br>
<br>
Can someone point me in the right direction?<br>
<br>
<br>
</blockquote>
<div><br>
I do this to logout using Basic Auth.<br>
<br>
It detect if I'm logged, if it's true then raise an
unauthorized status and ask again for user and password. Just
press OK and you are logout.<br>
<br>
PageTemplate:<br>
<div id="cuadro-usuario"<br>
tal:define="usr user/getUserName"><br>
<br>
<div tal:condition="python: usr <> 'Anonymous
User'"><br>
<span tal:condition="exists: request/salgo"><br>
<span tal:define="x
context/scripts/usuario_salir"></span><br>
</span><br>
<br>
<span tal:content="usr"></span><br>
<a tal:attributes="href python:request.BASE2 +
'?salgo=true'" <br>
target="_parent"> - Logout</a><br>
</div><br>
<br>
<br>
<div tal:condition="python: usr == 'Anonymous
User'"><br>
<span tal:condition="exists: request/entro"><br>
<span tal:define="x
context/scripts/usuario_entrar"></span><br>
</span><br>
<br>
<a tal:attributes="href python:request.BASE2 +
'?entro=true'" <br>
target="_parent">Login</a><br>
</div><br>
<br>
</div><br>
<br>
<br>
<usuario_entrar>:<br>
request = container.REQUEST<br>
response = request.RESPONSE<br>
<br>
response.setStatus('Unauthorized')<br>
response.setHeader('WWW-Authenticate', 'basic
realm="OPTIMUSMX', 1)<br>
<br>
<br>
<usuario_salir>:<br>
request = container.REQUEST<br>
response = request.RESPONSE<br>
<br>
response.setHeader('WWW-Authenticate', 'basic
realm="OPTIMUSMX', 1)<br>
response.setStatus('Unauthorized')<br>
<br>
<br>
<br>
</div>
</div>
-- <br>
________________________________________<br>
Lo bueno de vivir un dia mas<br>
es saber que nos queda un dia menos de vida<br>
</blockquote>
<br>
</body>
</html>