summaryrefslogtreecommitdiff
path: root/src/com/p4square/grow/frontend/GrowFrontend.java
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2013-06-03 18:34:33 -0700
committerJesse Morgan <jesse@jesterpm.net>2013-06-03 18:39:39 -0700
commit3b6dc4955f0aa67b2610b1bc90f156dd9a9d6cab (patch)
tree69a6769c68f40748d9dd9fc730f6772ceebaff85 /src/com/p4square/grow/frontend/GrowFrontend.java
parent9024f49ca63d0e7204bf61de5b06717e2ee6a1e6 (diff)
Adding the Survey page logic.
Diffstat (limited to 'src/com/p4square/grow/frontend/GrowFrontend.java')
-rw-r--r--src/com/p4square/grow/frontend/GrowFrontend.java11
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;
}