challenges are public now
This commit is contained in:
parent
382f5d959b
commit
6553a25257
@ -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
|
||||
|
||||
|
@ -4,21 +4,26 @@
|
||||
<a class="navbar-brand" href="@{HomeR}">Gonito.net
|
||||
$maybe user <- maybeUser
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
|
||||
<li><a href="@{HomeR}">_{MsgHome}</a>
|
||||
$if userIsAdmin $ entityVal user
|
||||
<li><a href="@{CreateChallengeR}">_{MsgCreateChallenge}</a>
|
||||
<li><a href="@{ListChallengesR}">_{MsgListChallenges}</a>
|
||||
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="@{AuthR LoginR}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">#{userIdent $ entityVal user}<span class="caret"></span>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="@{YourAccountR}">_{MsgYourAccount}</a></li>
|
||||
<li><a href="@{AuthR LogoutR}">_{MsgLogOut}</a></li>
|
||||
$nothing
|
||||
$nothing
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="@{HomeR}">_{MsgHome}</a>
|
||||
<li><a href="@{ListChallengesR}">_{MsgListChallenges}</a>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="@{AuthR LoginR}">log in</a>
|
||||
|
||||
$maybe msg <- mmsg
|
||||
<div #message .alert .alert-warning><a href="#" class="close" data-dismiss="alert">×</a> #{msg}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user