Hi,
Thank you very much Chris. It works!!!
All the problem was that the LoginAction was an extension of
VelocitySecureAction, and this class throws the template without executing
the screen java code.
Now it is an extension of VelocityAction.
I created a Login.java, (as you suggested) which has to be an extension of
VelocityScreen, and not secure as seen for the Action upper and i changed a
piece of code in the IsAuthorized method in my SecureScreen class.
It was:
protected boolean isAuthorized( RunData data ) throws Exception
{
boolean isAuthorized = false;
AccessControlList acl = data.getACL();
if (acl==null || ! acl.hasRole("turbine_root"))
{
data.setScreenTemplate(
TurbineResources.getString("template.login"));
isAuthorized = false;
}
else if(acl.hasRole("turbine_root"))
{
isAuthorized = true;
}
return isAuthorized;
}
And now it is:
protected boolean isAuthorized( RunData data ) throws Exception
{
boolean isAuthorized = false;
AccessControlList acl = data.getACL();
if (acl==null || ! acl.hasRole("turbine_root"))
{
this.doRedirect(data, "Login.vm");
isAuthorized = false;
}
else if(acl.hasRole("turbine_root"))
{
isAuthorized = true;
}
return isAuthorized;
}
Thank you very much!!!
Don't you have a clear example of how to use the Sceduler service?
that would help me also.
Regards!
FD
Chris Campbell <[EMAIL PROTECTED]> said:
> This is how I do it an it works like a charm:
1. create a Login.java screen class to go along with your login form =
(presumably Login.vm). This has special status and may be executed =
without being logged in because it is the home template
2. populate the context of the login template with =
"destination_template" and the parameters that come in with the request =
(the rundata object has everything you need, ie getTemplateInfo(), =
getParameters() )
3. in the action of the Login form, set the template to =
$destiation_template and for each parameter add a hidden input field to =
the form
ie
<form method="post"
action="$ling.setAction("Login").setTemplate($destination_template)">
#foreach($parameter in $parameters)
<input type=hidden name="$parameter" =
value="$parameters.get($parameter)">
blah blah...
</form>
Chris C
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 10:08 AM
To: Turbine Users List
Subject: Re: How to redirect after Login ! More information needed!
Thank you for the answer.
I've had a look to the archives.
What i have understood is that it is not possible to
do a redirect after login. TDK2.1 does not permit this yet.
Is that correct? This feature is quite important for our business =
because our
support engineers do not have time to open BUGTRACK (our application) =
and
navigate to the right page.
Is this feature working in TDK3.0.
If yes is TDK3.1 compatible with the TDK2.1 ? Or the porting implies a =
lot of
code change!
Regards!
Fabio Daprile
Heiko Braun <[EMAIL PROTECTED]> said:
> We had this discussion just a few weeks ago.
> The redirect should be implemented as the default behaviour.
> You might search the archives (www.mail-archive.com) to find =
additional
> information on this topic. Maybe someone takes this task and submits a
> patch to the 2.1 branch?
>
> /Heiko
>
> Am Mit, 2002-02-06 um 20.19 schrieb [EMAIL PROTECTED]:
> > Hello gentlemen,
> >
> > I'm developing a Bug Tracking application for my company with =
turbine.
> > I use turbine but don't know how it works internally.
> >
> > Here is my problem:
> >
> > when one of my collegues inserts a new bug in the system my =
application
sends
> > a mail to other users. This mail contains a direct link to the bug.
> >
> > the link looks like this:
> >
> > =
http://localhost:8080/bugtrack/servlet/bugtrack/template/ShowTicket.vm?
> > id=1&mode=display
> >
> > A user should click on this link and should be carried directly to =
the
> > ShowTicket page after the Login.
> >
> > The problem is the Login. Turbine sees that the user is not =
connected and
> > show him the login page, but at this point the link is lost.
> >
> > How can i store information included into the link so that i can =
redirect
> > after the authentication!
> >
> > Do i have to modify the security system.
> > Can somebody explain me what turbine does before the login and how =
is it
> > possible to read the data included in the link.
> > Is the session crested before displaying the login?
> >
> > If somebody can help me i'll be grateful!
> >
> >
> > Best regards!
> >
> > Fabio Daprile
> >
> >
> > --
> > To unsubscribe, e-mail: <mailto:turbine-user-
[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:turbine-user-
[EMAIL PROTECTED]>
> >
>
>
>
> --
> To unsubscribe, e-mail: <mailto:turbine-user-
[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:turbine-user-
[EMAIL PROTECTED]>
>
>
--
--
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]>
--
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>