Closed leccyril closed 6 years ago
? nothing ? no one have this specification ?
thanks a lot !
i have done like this 👍
`public Result doLogin() {
com.feth.play.module.pa.controllers.Authenticate.noCache(response());
final Form<MyLogin> filledForm = this.provider.getLoginForm()
.bindFromRequest();
if (filledForm.hasErrors()) {
//flash(Application.FLASH_ERROR_KEY, this.msg.preferred(request()).at("login.error"));
// User did not fill everything properly
return badRequest(login.render(this.auth, this.userProvider, filledForm));
} else {
Result result=this.provider.handleLogin(ctx());
// Everything was filled
if("/".equals(result.redirectLocation().get())){
final User localUser = this.userProvider.getUser(session());
if(localUser.getStringRoles().contains(Role.SMARTCASTER)) {
result=redirect(controllers.routes.DashboardManagement.viewSmartCasterGeneralDashboard().toString());
}else {
result=redirect(controllers.routes.DashboardManagement.viewSupervisorDashboard().toString());
}
}
return result;
}
}`
maybe not class, but without response i had to do this... thanks !
Hi thanks for your great tool !
How can we change the redirection URL, for example following the user role we want to redirect on different URL
It is very important for all versions i think it is a missing configuration really nice and mandatory with your tool.
How we can do ?
thank you very much to maintain the only one module authenticate on my favorite framework !