From 467d486e58baca012a3b6d1fa4f31ae3912754a6 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 25 Sep 2014 11:29:53 -0400 Subject: [PATCH] closes #2145 --- src/controllers/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/index.js b/src/controllers/index.js index 0dabd3dcab..ec646a3800 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -152,6 +152,9 @@ Controllers.login = function(req, res, next) { }; Controllers.register = function(req, res, next) { + if(meta.config.allowRegistration !== undefined && parseInt(meta.config.allowRegistration, 10) === 0) { + return res.redirect(nconf.get('relative_path') + '/403'); + } var data = {}, login_strategies = auth.get_login_strategies(),