I think so.  I believe that one or more of the filters will populate the
UserPrincipal as a convenience, but the test should really be using the
SecurityContext

> -----Original Message-----
> From: Robin Helgelin [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 07, 2008 17:14
> To: Tapestry users
> Subject: Re: tapestry-spring-security and openid
> 
> On Tue, Oct 7, 2008 at 10:58 PM, Jonathan Barker
> <[EMAIL PROTECTED]> wrote:
> > I'm assuming this hasn't changed since tapestry5-acegi.  The IfLoggedIn
> > component uses the following test:
> >
> >    private boolean test() {
> >        Principal principal =
> > requestGlobals.getHTTPServletRequest().getUserPrincipal();
> >        return principal != null && principal.getName() != "";
> >    }
> >
> > Unfortunately, you really need to have a test based on the
> SecurityContext:
> >
> >        Authentication currentAuth = null;
> >        currentAuth =
> > SecurityContextHolder.getContext().getAuthentication();
> >        return (currentAuth !=null)
> 
> Maybe this should be changed then?
> 
> --
>         regards,
>         Robin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to