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?