[Zope] create Login/Logout functionality
AM
list_subscriber@neurobs.com
Tue, 06 May 2003 07:57:01 -0700
Have you looked at the CookieCrumbler product. It can be used in
conjunction with any UserFolder to provide a nice login page. And then
the link you desire can point to that page. Thats what we do on our
site. To logoff just call the user_logout function of the userfolder or
just send back a 403
AM
Andreas Pakulat wrote:
>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
>
>
>
--
==================================================================
Aseem Mohanty
Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706
(R) 510 7696011 (M) 510 3014871 (O) 510 5279231
==================================================================
"I saw `cout' being shifted "Hello world" times to the left and
stopped right there!!" -- Steve Gonedes
==================================================================