Merge pull request #799 from SISheogorath/fix/AnonymousEditTypos

Fix typos for `allowAnonymousEdits`
This commit is contained in:
Christoph (Sheogorath) Kern 2018-04-11 22:48:15 +02:00 committed by GitHub
commit 387afd1791
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -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)) {

View file

@ -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

View file

@ -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,