[Zope-dev] How can I find out who visited a URL within my Zope Product?

Andy McKay andy@agmweb.ca
Tue, 8 Oct 2002 15:44:55 -0700


An Access Rule doesnt let you find the authenticated user check this post a
few weeks ago:

http://lists.zope.org/pipermail/zope-dev/2002-September/017596.html
--
  Andy McKay
  www.agmweb.ca


----- Original Message -----
From: "Tim McLaughlin" <tim@siteworx.com>
To: "Craeg K Strong" <cstrong@arielpartners.com>
Cc: <zope-dev@zope.org>
Sent: Tuesday, October 08, 2002 3:12 PM
Subject: Re: [Zope-dev] How can I find out who visited a URL within my Zope
Product?


> Much easier and nicer is to use an "Access Rule"  (look in the Add
drop-down).
>
> Tim
>
> Craeg K Strong wrote:
> > Hello:
> >
> > I would like to log the identity of the authenticated
> > user for *every* URL traversal within my Zope Product.
> >
> > For example, let's say that my forms-based web application contains 50
> > screens.  They are all protected such that only authenticated users
> > can view them.  Any one of them could be bookmarked, so a user could
> > "jump in" at any point.
> >
> > I want to record the fact that a user visited a screen, each and every
> > time they do so.
> >
> > A natural place to do this would be in a pre-traversal hook, but I seem
> > to be stymied by the lack of authentication information in
> > __bobo_traverse__
> > or __before_publishing_traverse__
> >
> > Can anyone think of a way this could be done?
> >
> > I suppose I could hack all of my ZPTs to call a "registerUser" method
> > by putting it in an empty <span> in their shared header, but that seems
> > to mix concerns.  Why should my ZPTs have knowledge of this workflow
> > requirement?
> >
> > Thanks in advance!
> >
> > --Craeg
> >
> >
> > _______________________________________________
> > Zope-Dev maillist  -  Zope-Dev@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope )
>
> --
> Tim McLaughlin
> Chief Technology Officer
> Siteworx, Inc... Set your site on the future!
> 703.390.5421
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>