diff options
Diffstat (limited to 'src/com/p4square/grow/frontend/GrowFrontend.java')
-rw-r--r-- | src/com/p4square/grow/frontend/GrowFrontend.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/p4square/grow/frontend/GrowFrontend.java b/src/com/p4square/grow/frontend/GrowFrontend.java index 85b223b..72e2a8f 100644 --- a/src/com/p4square/grow/frontend/GrowFrontend.java +++ b/src/com/p4square/grow/frontend/GrowFrontend.java @@ -28,12 +28,21 @@ public class GrowFrontend extends FMFacade { protected Router createRouter() { Router router = new Router(getContext()); - final LoginAuthenticator defaultGuard = + final LoginAuthenticator defaultGuard = new LoginAuthenticator(getContext(), true, "login.html"); defaultGuard.setNext(FreeMarkerPageResource.class); router.attachDefault(defaultGuard); router.attach("/login.html", LoginPageResource.class); + final Router accountRouter = new Router(getContext()); + accountRouter.attach("/assessment/question/{questionId}", SurveyPageResource.class); + accountRouter.attach("/assessment", SurveyPageResource.class); + + final LoginAuthenticator accountGuard = + new LoginAuthenticator(getContext(), false, "login.html"); + accountGuard.setNext(accountRouter); + router.attach("/account", accountGuard); + return router; } |