Permalink
Browse files

judges can see all entries

  • Loading branch information...
1 parent 994ebac commit 98a632b1864347ce08963bf9583a70de86069440 @gerad gerad committed Nov 17, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 controllers/teams.coffee
  2. +2 −2 views/teams/entries.jade
View
@@ -48,7 +48,7 @@ app.get /^\/(entries)?\/?$/, (req, res, next) ->
null
# during voting, only contestants can sort by category
- if voting and not req.user?.contestant and not req.user?.admin
+ if voting and not req.user?.contestant and not req.user?.admin and not req.user?.judge
sort = null
# handle overall vs solo (TODO should be team, not overall)
@@ -83,7 +83,7 @@ app.get /^\/(entries)?\/?$/, (req, res, next) ->
# while voting is going on, only allow sorting for teams that the user is on
# or has voted on
- if voting and score and not req.user?.admin
+ if voting and score and not req.user?.admin and not req.user?.judge
req.user.votedOnTeamIds (err, teamIds) ->
return next(err) if err
req.user.team (err, team) ->
View
@@ -4,7 +4,7 @@ h1 Entries (#{teams.count})
form.search
input( type='search', name='q', value=req.query.q, placeholder='Search' )
-if (req.user && (req.user.contestant || req.user.admin)) || !voting
+if (req.user && (req.user.contestant || req.user.admin || req.user.judge)) || !voting
ul.sorts
li Order by:
if voting
@@ -14,7 +14,7 @@ if (req.user && (req.user.contestant || req.user.admin)) || !voting
- s = k.split(/\W/)[0].toLowerCase()
li( class= sort === s ? 'current' : '' )
a( href=urlFor({ sort: s }) )= k
- if voting && sort && (req.user && req.user.contestant && !req.user.admin)
+ if voting && sort && (req.user && req.user.contestant && !req.user.admin && !req.user.judge)
p
strong.scary This list only shows teams that you've voted on.
|

0 comments on commit 98a632b

Please sign in to comment.