From 3c0667813cb1a3d5a0d730eabc70835b52518dfe Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 16 Jan 2017 12:41:34 +0800 Subject: Fix missing config in hackmd response --- lib/response.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/response.js') diff --git a/lib/response.js b/lib/response.js index 9014a0a0..57d6861d 100755 --- a/lib/response.js +++ b/lib/response.js @@ -97,7 +97,8 @@ function responseHackMD(res, note) { dropbox: config.dropbox, google: config.google, ldap: config.ldap, - email: config.email + email: config.email, + allowemailregister: config.allowemailregister }); } -- cgit v1.2.3 From 14734372956fa5d6c6159ba8c4b00a90b80ea8d6 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 16 Jan 2017 23:47:53 +0800 Subject: Refactor checkViewPermission to fix limited & protected permission check bug and fix code style --- lib/response.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/response.js') diff --git a/lib/response.js b/lib/response.js index 57d6861d..585d1d54 100755 --- a/lib/response.js +++ b/lib/response.js @@ -127,10 +127,10 @@ function checkViewPermission(req, note) { else return true; } else if (note.permission == 'limited' || note.permission == 'protected') { - if( !req.isAuthenticated() ) { + if(!req.isAuthenticated()) return false; - } - return true; + else + return true; } else { return true; } -- cgit v1.2.3