You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Th...@sp-integration.de on 2002/12/16 20:15:16 UTC

Once again: No redirect after Login

Hello!

I am a turbine beginner and have a great problem!
I use tdk 2.1.
I have create a new user with another role than "turbine".
The Login is successful.

"$ data.getUser().getFirstName()" in Login.vm
give me the name of the user and
"$data.getUser().hasLoggedIn()" is true.

In "TurbineResources.template" i have set:
services.VelocityService.default.screen=SecureScreen

an my SecureScreen-Code is:

public class SecureScreen extends VelocitySecureScreen {
    public void doBuildTemplate(RunData data, Context context) throws 
Exception 
    {
    }

 
    protected boolean isAuthorized( RunData data ) throws Exception 
    {
                boolean isAuthorized = false;
                isAuthorized = (data.getACL() != null);
                if (!isAuthorized)
                        setTemplate(data, "Login.vm");
                return isAuthorized;
          }
}




But there is no redirect to Index.vm ?

What can I do?


        Thomas

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Once again: No redirect after Login

Posted by Th...@sp-integration.de.
Thank Eric!

In the TDK example application after Login the user bekame a redirect to 
Index.vm.

With another user the one has other group this isn't possible!
I will try what you send me.
This is my Problem.


                Thomas

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Once again: No redirect after Login

Posted by Eric Emminger <er...@ericemminger.com>.
Thomas

> But there is no redirect to Index.vm ?

Let me see if I understand what you want to do. After you log in, you
want to redirect the user to a different page (Index.vm). Is this
correct? If so, you'll do the redirect in the log in action. 

If I remember correctly, you'll do this in
org.apache.turbine.flux.modules.actions.FluxLogin by adding something
like

TemplateLink link = new TemplateLink(data);
data.setRedirectURI(link.setPage("Index.vm").toString());
data.setStatusCode(302);

Does that help?

Eric

-- 
Eric Emminger
eric@ericemminger.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>