Upon successful user login i want the page to redirect to /person/personCreate and it did work after adding the following code to Config.groovy.
In the spring security plugin, you'll find a LoginController.groovy.template and an auth.gsp.template.
You should copy those into your project and then modify the def auth() method to look something like this:
/**
* Show the login page.
*/
def auth = {
def config = SpringSecurityUtils.securityConfig
if (springSecurityService.isLoggedIn()) {
def currentUser = springSecurityService.currentUser
if (currentUser.userType.human)) {
redirect controller: 'human'
}
else if (currentUser.userType.superHuman) {
redirect controller: 'superHuman'
}
else {
redirect uri: config.successHandler.defaultTargetUrl
}
return
}
String view = 'auth'
String postUrl = "${request.contextPath}${config.apf.filterProcessesUrl}"
render view: view, model: [postUrl: postUrl,
rememberMeParameter: config.rememberMe.parameter]
}