[Zope] create Login/Logout functionality

Andreas Pakulat ap125@informatik.uni-rostock.de
Mon, 05 May 2003 22:02:06 +0200


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

On 05.Mai 2003 - 13:30:23, Troy Farrell wrote:
> Entheos Software does zope consulting and custom programming :)
>=20
> Change the script so it doesn't print anything out like this:
> ## Script (Python) "authtest"
> ##bind container=3Dcontainer
> ##bind context=3Dcontext
> ##bind namespace=3D
> ##bind script=3Dscript
> ##bind subpath=3Dtraverse_subpath
> ##parameters=3D
> ##title=3D
> ##
> request =3D container.REQUEST
> response =3D  request.RESPONSE
>=20
> if request.get('AUTHENTICATED_USER').getUserName() =3D=3D 'Anonymous User=
':
>   response.setStatus('Unauthorized')
>   response.setHeader('WWW-Authenticate', 'basic realm=3D"Zope"', 1)
>=20
> #end script
>=20
> Then, add this line to your page template:
>=20
> <span tal:replace=3D"here/authtest" />
>=20
> or this to a dtml document:
>=20
> <dtml-call name=3D"authtest">
>=20
> And try that.

No chance, as said earlier, I have a link pointing to the python script,
if I insert the <dtml-call name=3D"login_script"> there it gets called
everytime the document is accessed, which is not what I wanted. I want
the users that are authorized, to click that link and authenticate
themselfes, so they get the full access to the site.

Andreas

--=20
Don't you feel more like you do now than you did when you came in?

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

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

iD8DBQE+tsM+uekl0h+nrMIRAszoAJ9/tJ1l/wuVeepfihIn/QwyMUsOGACfe4Zy
DDTiKtkdpMZUzK5EaqVBqrU=
=IupV
-----END PGP SIGNATURE-----

--YiEDa0DAkWCtVeE4--