login should bring the user back to where he came from

This commit is contained in:
Kohsuke Kawaguchi 2012-12-22 09:33:07 -08:00
parent 4b37fdc2ae
commit 1f0918c934
2 changed files with 24 additions and 1 deletions

23
readme.md Normal file
View File

@ -0,0 +1,23 @@
Testing locally
===============
First, set up a tunnel to Jenkins LDAP server. Run the following command and keep the terminal open:
ssh -L 9389:localhost:389 cucumber.jenkins-ci.org
Create `config.properties` in the same directory as `pom.xml`. See the `Parameters` class for the details,
but it should look something like the following:
server=ldap://localhost:9389/
managerDN=cn=admin,dc=jenkins-ci,dc=org
newUserBaseDN=ou=people,dc=jenkins-ci,dc=org
smtpServer=localhost
recaptchaPublicKey=6Ld--8ASAAAAANHmHaM1sdSYshtmXTin1BNtaw86
recaptchaPrivateKey=*****
managerPassword=*****
Finally, run the application with Jetty, then access `http://localhost:8080/`:
mvn jetty:run
(As you can see above, this connects your test instance to the actual LDAP server, so the data you'll be seeing
is real.

View File

@ -281,7 +281,7 @@ public class Application {
// to limit the redirect to this application, require that the from URL starts from '/'
if (from==null || !from.startsWith("/")) from="/myself/";
return HttpResponses.redirectViaContextPath(from);
return HttpResponses.redirectTo(from);
}
/**