From 78a6a2c208b999806adb556c820865e5330a8f56 Mon Sep 17 00:00:00 2001 From: Hike Danakian Date: Wed, 12 Jun 2013 18:21:33 -0700 Subject: [PATCH] Require user to have a webmaker account before creating events. --- controllers/events.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/events.js b/controllers/events.js index cb8f936..0b477d7 100644 --- a/controllers/events.js +++ b/controllers/events.js @@ -38,7 +38,8 @@ module.exports = function (init) { if (!(event.organizer = req.session.email)) return res.reply(401, 'Log in to create Events'); - event.organizerId = req.session.username; + if (!(event.organizerId = req.session.username)) + return res.reply(403, 'Create an account first'); var picture = event.picture; delete event.picture;