From dfcdcaa678b632444684299c075a22e138d0e4c3 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Fri, 21 Mar 2014 17:20:47 -0700 Subject: [PATCH] No email addresses for non-admins on CLA submissions. --- app/templates/admin/clas.jade | 3 ++- server/routes/db.coffee | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/templates/admin/clas.jade b/app/templates/admin/clas.jade index 16c16c98e..f05a22be4 100644 --- a/app/templates/admin/clas.jade +++ b/app/templates/admin/clas.jade @@ -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} \ No newline at end of file diff --git a/server/routes/db.coffee b/server/routes/db.coffee index 177182888..723e15b90 100644 --- a/server/routes/db.coffee +++ b/server/routes/db.coffee @@ -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