[Zope] Login Button, sorted

Phil Harris phil@philh.org
Fri, 18 Jun 1999 08:57:06 +0100


Hi all

Just a post to let you know how I solved the login button probloem I had
yesterday.

This is the DTML I used:

<dtml-if "AUTHENTICATED_USER.has_role(['author'])">
  <dtml-call "REQUEST.set('isallowed',1)">
<dtml-else>
  <dtml-raise Unauthorized>
  </dtml-raise>
</dtml-if>
<dtml-if REFERER>
  <dtml-call "RESPONSE.redirect(REFERER)">
<dtml-else>
  <dtml-call "RESPONSE.redirect('home_html')">
</dtml-if>

It works for me, and may give other's some ideas.

HTH

Phil
phil@philh.org