[Zope] Re: ZPT Equivalent for SecurityGetUser

Andreas Pakulat ap125@informatik.uni-rostock.de
Wed, 21 May 2003 12:16:45 +0200


--IMjqdzrDRly81ofr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 21.Mai 2003 - 11:53:38, Andreas Pakulat wrote:
> On 20.Mai 2003 - 18:28:21, Evan Simpson wrote:
> > Andreas Pakulat wrote:
> > >And my conversion looks like:
> > >
> > >	<span tal:condition=3D"python: here.REQUEST['AUTHENTICATED_USER'] =3D=
=3D=20
> > >	'Anonymous User'">
> >=20
> > <span tal:condition=3D"python:user.has_role(['Authenticated'])">
>=20
> Thanks so much. That works even better than my own workaround:
> tal:define=3D"name user/getUserName"
> tal:condition=3D"python: name =3D=3D 'Anonymous User'"
>=20
> Where I still wasn't logged out, but clicking the manage_zmi_logout Link
> worked.
>=20
> Now with you tip it works perfectly.

Looks like that mail was send to early :( I had a small error in my
logout_form, a "not" in the wrong place.=20

I still have a problem when logging out, as it is not performed
automagically :( When I click logout and this loads the logout_form ZPT
I get the message=20
"You're still logged in using ZMI" and a link where I can log off with
manage_zmi_logout. Which works perfectly, but I wnat to have the user
already logged off when he clicks on the Logout-Link and not to have him
click on another link. It also doesn`t play a role if I exclude the
macro-Things from the logout_form template. As said, the DTML-Method's
work.=20

Has anybody a hint why DTML works and ZPT not?! I think it has to do
with this SecurityGetUser(), but am not sure.


--=20
It's all in the mind, ya know.

--IMjqdzrDRly81ofr
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+y1INuekl0h+nrMIRAvWSAKCgnn7SVA+mw8VqUj1kHYRJZT1LOwCeI4Bb
wyjY9lJD8Uv4yr0ZvIWZ28Y=
=jssO
-----END PGP SIGNATURE-----

--IMjqdzrDRly81ofr--