From f57d80637b41455327065dc6e98906873db03c9c Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Wed, 11 Nov 2015 13:28:34 +0100 Subject: [PATCH] only admins can see "add challenge" --- templates/default-layout.hamlet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet index 5b24463..a64800b 100644 --- a/templates/default-layout.hamlet +++ b/templates/default-layout.hamlet @@ -2,7 +2,8 @@ $maybe user <- maybeUser _{MsgLoggedAs} #{userIdent $ entityVal user} \ | _{MsgHome} - \ | _{MsgCreateChallenge} + $if userIsAdmin $ entityVal user + \ | _{MsgCreateChallenge} \ | _{MsgListChallenges} \ | _{MsgYourAccount} \ | _{MsgLogOut}