From 9530bead9c2a584f0a1eeb550b36de8a92e1381f Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 26 Jun 2014 22:03:45 +0000 Subject: [PATCH] fix web access --- modules/web/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/web/api.js b/modules/web/api.js index 64f7f05..1d02a77 100644 --- a/modules/web/api.js +++ b/modules/web/api.js @@ -28,7 +28,7 @@ var api = function(dbot) { if(mConfig.requireWebLogin == true) { if(req.isAuthenticated()) { - if(_.has(mConfig.pageAccess, path)) { + if(_.has(mConfig, 'pageAccess') && _.has(mConfig.pageAccess, path)) { accessNeeded = mConfig.pageAccess[path]; } else if(!_.isUndefined(mConfig.webAccess)) { accessNeeded = mConfig.webAccess;