diff --git a/grails-app/conf/DefaultNimbleConfig.groovy b/grails-app/conf/DefaultNimbleConfig.groovy index 53b02f8..62c5061 100644 --- a/grails-app/conf/DefaultNimbleConfig.groovy +++ b/grails-app/conf/DefaultNimbleConfig.groovy @@ -39,6 +39,11 @@ nimble { validregex = '[a-zA-Z0-9]*' } provision { active = false } + + authentication { + postLoginUrl = "/" + } + } fields { diff --git a/grails-app/controllers/grails/plugin/nimble/core/AuthController.groovy b/grails-app/controllers/grails/plugin/nimble/core/AuthController.groovy index d53e4dc..79e6b11 100644 --- a/grails-app/controllers/grails/plugin/nimble/core/AuthController.groovy +++ b/grails-app/controllers/grails/plugin/nimble/core/AuthController.groovy @@ -61,7 +61,7 @@ class AuthController { SecurityUtils.subject.login(authToken) userService.createLoginRecord(request) - def targetUri = session.getAttribute(AuthController.TARGET) ?: "/" + def targetUri = session.getAttribute(AuthController.TARGET) ?: nimbleConfig.localusers.authentication.postLoginUrl session.removeAttribute(AuthController.TARGET) log.info("Authenticated user, $username") diff --git a/grails-app/taglib/NimbleAuthTagLib.groovy b/grails-app/taglib/NimbleAuthTagLib.groovy index 9397414..59aff52 100644 --- a/grails-app/taglib/NimbleAuthTagLib.groovy +++ b/grails-app/taglib/NimbleAuthTagLib.groovy @@ -57,7 +57,7 @@ class NimbleAuthTagLib { def principalLink = {attrs, body -> def user = getUser() if (user) { - new MarkupBuilder(out).a('href': createLink(controller: 'user', action: 'show', id: id), 'class': 'icon icon_user', body()) {} + new MarkupBuilder(out).a('href': createLink(controller: 'user', action: 'show', id: user.id), body()) {} } } diff --git a/grails-app/views/user/show.gsp b/grails-app/views/user/show.gsp index c191e19..4384e95 100644 --- a/grails-app/views/user/show.gsp +++ b/grails-app/views/user/show.gsp @@ -28,16 +28,16 @@ - + - + - +