From 2492cf2cdfce5fdb935862bcf71bb036b1920327 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Tue, 10 Apr 2018 14:38:39 +0200 Subject: [PATCH] Fix typos for `allowAnonymousEdits` Looks like we lost some variables during the refactoring of the configs to camel case. This should fix it. Signed-off-by: Sheogorath --- lib/config/index.js | 2 +- lib/realtime.js | 2 +- lib/response.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/config/index.js b/lib/config/index.js index d885ee921..bdba5e0e2 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -53,7 +53,7 @@ if (config.ldap.tlsca) { // Permission config.permission = Permission -if (!config.allowAnonymous && !config.allowAnonymousedits) { +if (!config.allowAnonymous && !config.allowAnonymousEdits) { delete config.permission.freely } if (!(config.defaultPermission in config.permission)) { diff --git a/lib/realtime.js b/lib/realtime.js index d8b0b4c55..070bde2dd 100644 --- a/lib/realtime.js +++ b/lib/realtime.js @@ -788,7 +788,7 @@ function connection (socket) { var note = notes[noteId] // Only owner can change permission if (note.owner && note.owner === socket.request.user.id) { - if (permission === 'freely' && !config.allowAnonymous && !config.allowAnonymousedits) return + if (permission === 'freely' && !config.allowAnonymous && !config.allowAnonymousEdits) return note.permission = permission models.Note.update({ permission: permission diff --git a/lib/response.js b/lib/response.js index d5c685cae..ae3e45fa7 100644 --- a/lib/response.js +++ b/lib/response.js @@ -59,7 +59,7 @@ function showIndex (req, res, next) { url: config.serverURL, useCDN: config.useCDN, allowAnonymous: config.allowAnonymous, - allowAnonymousEdits: config.allowAnonymousedits, + allowAnonymousEdits: config.allowAnonymousEdits, facebook: config.isFacebookEnable, twitter: config.isTwitterEnable, github: config.isGitHubEnable, @@ -94,7 +94,7 @@ function responseHackMD (res, note) { title: title, useCDN: config.useCDN, allowAnonymous: config.allowAnonymous, - allowAnonymousEdits: config.allowAnonymousedits, + allowAnonymousEdits: config.allowAnonymousEdits, facebook: config.isFacebookEnable, twitter: config.isTwitterEnable, github: config.isGitHubEnable,