On 1/6/06, Kevin Dangoor <[EMAIL PROTECTED]> wrote:
>
> On 1/6/06, Mike Orr <[EMAIL PROTECTED]> wrote:
> >  Otherwise you protect all the methods but forget about
> > one, or don't realize one can be accessed in an unauthenticated
> > manner.  Quixote does this easily in ._q_traverse(), which is called
> > on every access to or through the directory.  It's also a useful place
> > to set default request attributes, redirect, and other needs the
> > developers didn't foresee.  Can TG have an optional hook method in its
> > directory classes for stuff like this?
>
> In CherryPy, you have the default method which fires if there is no
> matching method. Otherwise, the general solution is to use a Filter to
> hook in some other behavior that always fires.

The default method doesn't help for this.  The point is to call it
before the regular method, not if the regular method doesn't exist. 
Filters may be an option, but if you have to specify it in the config
fire you're separating it from what needs to be authorized, so it can
get out of sync without being noticed.

--
Mike Orr <[EMAIL PROTECTED]>
([EMAIL PROTECTED] address is semi-reliable)

Reply via email to