Robin Helgelin schrieb:
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?

I'm not sure. Have no time to digg the Spring Security docs. The second
approach is the one preferred by spring security.


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

Reply via email to