Rodney,

Thanks, that worked like a charm. For whatever reason I did not have the
data.setACL(TurbineSecurity.getACL(user)) method in my LoginUser. I don't
know if this is 2.1 vs. 2.2 or you guys added this or what but I can get
an ACL now and I'm on my way.

Thanks,
Fred


On Tue, 7 Jan 2003, Rodney Schneider wrote:

> On Tue, 7 Jan 2003 14:44, you wrote:
> > Hello,
> >
> > I've also been looking at this post and want to have users with
> > different Roles be directed to different Screens after they log in.
> >
> > What I don't get about this post his how all the parameters that he's
> > placing in the Login.vm form are going to be related to the user in
> > the MyLoginUser action when the server processes the login request.
> >
> > What I've tried is using data.getACL() and then using the
> > AccessControlList's hasRole() method in my MyLoginUser class, but
> > getACL() returns null in the LoginUser class so that didn't get me
> > too far.
>
> You can use the ACL in your Login action, but only after you have
> properly logged in the user.  We use the following code in our Login
> action before redirecting them to the appropriate homepage:
> ------------
>    User user = TurbineSecurity
>                  .getAuthenticatedUser( username, password );
>    data.setUser(user);
>    data.setACL(TurbineSecurity.getACL(user));
>    user.setHasLoggedIn(new Boolean(true));
>    user.updateLastLogin();
>    TurbineSecurity.saveUser(user);
>    data.save();
> ------------
>
> > The below post has the quote "It is not possible to do a redirect
> > after login. TDK 2.1 does not permit this yet." Is this true? I'm
> > using 2.1, has this been fixed in 2.2?
>
> This should work fine in 2.1.
>
> Regards,
>
> -- Rodney
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>



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

Reply via email to