From 6553a252571eccf619421cfcfbc779a78cbd8608 Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Mon, 14 Mar 2016 21:24:33 +0100 Subject: [PATCH] challenges are public now --- Foundation.hs | 7 +++++++ templates/default-layout.hamlet | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Foundation.hs b/Foundation.hs index 44cf92b..57367b2 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -107,6 +107,13 @@ instance Yesod App where isAuthorized HomeR _ = return Authorized isAuthorized QueryFormR _ = return Authorized isAuthorized (QueryResultsR _) _ = return Authorized + isAuthorized ListChallengesR _ = return Authorized + + isAuthorized (ShowChallengeR _) _ = return Authorized + isAuthorized (ChallengeReadmeR _) _ = return Authorized + isAuthorized (ChallengeAllSubmissionsR _) _ = return Authorized + isAuthorized (ChallengeGraphDataR _) _ = return Authorized + -- Default to Authorized for now. isAuthorized _ _ = isTrustedAuthorized diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet index 0a09247..0cf1e93 100644 --- a/templates/default-layout.hamlet +++ b/templates/default-layout.hamlet @@ -4,21 +4,26 @@ Gonito.net $maybe user <- maybeUser