[guadec-web-regcfp/develop] fixes



commit 8b79d3ed0a5e816c3fb8ff8c110d71fe04e7c0e5
Author: Patrick Uiterwijk <puiterwijk redhat com>
Date:   Thu May 21 14:43:30 2015 +0200

    fixes

 routes/auth.js |    2 ++
 utils.js       |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/routes/auth.js b/routes/auth.js
index c4f65bd..d14e33f 100644
--- a/routes/auth.js
+++ b/routes/auth.js
@@ -3,6 +3,8 @@ var router = express.Router();
 
 var browserid = require('browserid-verify')();
 
+var utils = require('../utils');
+
 var models = require('../models');
 var User = models.User;
 
diff --git a/utils.js b/utils.js
index db8ad7c..977da57 100644
--- a/utils.js
+++ b/utils.js
@@ -64,6 +64,8 @@ utils.require_permission = function(permission) {
 utils.require_login = function(req, res, next) {
   if(req.session.currentUser == null) {
     res.render('auth/no_permission', { required_permission: 'Login' });
+  } else {
+    next();
   }
 };
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]