[prev in list] [next in list] [prev in thread] [next in thread]
List: zope
Subject: Re: [Zope] create Login/Logout functionality
From: Andreas Pakulat <ap125 () informatik ! uni-rostock ! de>
Date: 2003-05-05 20:02:06
[Download RAW message or body]
On 05.Mai 2003 - 13:30:23, Troy Farrell wrote:
> Entheos Software does zope consulting and custom programming :)
>
> Change the script so it doesn't print anything out like this:
> ## Script (Python) "authtest"
> ##bind container=container
> ##bind context=context
> ##bind namespace=
> ##bind script=script
> ##bind subpath=traverse_subpath
> ##parameters=
> ##title=
> ##
> request = container.REQUEST
> response = request.RESPONSE
>
> if request.get('AUTHENTICATED_USER').getUserName() == 'Anonymous User':
> response.setStatus('Unauthorized')
> response.setHeader('WWW-Authenticate', 'basic realm="Zope"', 1)
>
> #end script
>
> Then, add this line to your page template:
>
> <span tal:replace="here/authtest" />
>
> or this to a dtml document:
>
> <dtml-call name="authtest">
>
> And try that.
No chance, as said earlier, I have a link pointing to the python script,
if I insert the <dtml-call name="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
--
Don't you feel more like you do now than you did when you came in?
[Attachment #3 (application/pgp-signature)]
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic