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 08:13:19 UTC
No redirect after Login
Hello!
I am a turbine beginner and have a great problem!
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.
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: No redirect after Login
Posted by Th...@sp-integration.de.
Hello!
See my first mail:
LoggedIn is true!
I program or else with Struts and I think that I remain there.
Thomas
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: No redirect after Login
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Thomas.Fischer@sp-integration.de writes:
>Hallo Henning!
>Du hattest mir gemailt, dass ich in den Properties
>template.homepage=Index.vm
>eingestellt werden muß.
>Da ich die "nackte" Beispielapplikation teste ist das per default schon
>eingestellt.
>Wenn ich mich mit "turbine" "turbine" einlogge werde ich ja auch weiter
>geleitet.
>Nur eben bei einem andere User mit einer anderen Rolle erfolgt das nicht.
Hi,
the checking of the roles happens in the classes which back the
screens. If you're talking about the Flux App, there is the
"SecureScreen" class which backs all of the Flux Screens. It tests
whether you have the "turbine_root" role. If your user does not have
this role, he is not authorized to use the application. So he won't get
redirected.
The following thing happens:
You log on. Turbine sends you to the template.homepage.
The template.homepage is set to "Index.vm". That one is backed by
"index.java" in the modules.screens package of the Flux application.
index.java, extends SecureScreen.java which extends VelocitySecureScreen.
So SecureScreen::isAuthorized is called, before your screen is
displayed. Inside, the app notices, that you're not authorized (line
92), so it sets the ScreenTemplate to the login screen. After that, it
returns "false" to the VelocitySecureScreen which avoids rebuilding of
the template but simply sends you back to the login.template.
So you get redirected. Twice. Once from Login to Index and then back
from Index to Login. This is not a "HTTP redirect", so you won't
notice on your browser!
Give the "turbine_root" role to your user and it will work.
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: No redirect after Login
Posted by Th...@sp-integration.de.
Hallo Henning!
Du hattest mir gemailt, dass ich in den Properties
template.homepage=Index.vm
eingestellt werden muß.
Da ich die "nackte" Beispielapplikation teste ist das per default schon
eingestellt.
Wenn ich mich mit "turbine" "turbine" einlogge werde ich ja auch weiter
geleitet.
Nur eben bei einem andere User mit einer anderen Rolle erfolgt das nicht.
Thomas
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: No redirect after Login
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Thomas.Fischer@sp-integration.de writes:
>Hello!
>I am a turbine beginner and have a great problem!
>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.
>But there is no redirect to Index.vm ?
What is your template.homepage ?
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>