mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
No email addresses for non-admins on CLA submissions.
This commit is contained in:
parent
4bc1e6805b
commit
dfcdcaa678
2 changed files with 4 additions and 1 deletions
|
@ -9,7 +9,8 @@ block content
|
|||
each cla in clas
|
||||
tr
|
||||
td #{cla.name}
|
||||
td #{cla.email}
|
||||
if me.isAdmin()
|
||||
td #{cla.email}
|
||||
td #{cla.githubUsername}
|
||||
td #{cla.created}
|
||||
|
|
@ -13,6 +13,8 @@ module.exports.setup = (app) ->
|
|||
resultCursor = collection.find {}
|
||||
resultCursor.toArray (err, docs) ->
|
||||
return log.error "Couldn't fetch distinct CLA submissions because #{err}" if err
|
||||
unless req.user?.isAdmin()
|
||||
delete doc.email for doc in docs
|
||||
res.send docs
|
||||
res.end
|
||||
|
||||
|
|
Loading…
Reference in a new issue