summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--lib/config/index.js2
-rw-r--r--lib/realtime.js2
-rw-r--r--lib/response.js4
4 files changed, 8 insertions, 4 deletions
diff --git a/README.md b/README.md
index 33dd1160..5ab6c849 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,7 @@ HackMD Community Edition
[![build status][travis-image]][travis-url]
[![version][github-version-badge]][github-release-page]
[![Help Contribute to Open Source][codetriage-image]][codetriage-url]
+[![POEditor][poeditor-image]][poeditor-url]
HackMD lets you create realtime collaborative markdown notes on all platforms.
Inspired by Hackpad, with more focus on speed and flexibility.
@@ -59,6 +60,7 @@ Thanks for using! :smile:
- Database (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL) use charset `utf8`
- npm (and its dependencies, especially [uWebSockets](https://github.com/uWebSockets/uWebSockets#nodejs-developers), [node-gyp](https://github.com/nodejs/node-gyp#installation))
- For **building** HackMD we recommend to use a machine with at least **2GB** RAM
+- (optional) *For development you may need to increase the number of allowed open file descriptors on your machine*
### Instructions
@@ -327,3 +329,5 @@ See more at [http://operational-transformation.github.io/](http://operational-tr
[standardjs-url]: https://github.com/feross/standard
[codetriage-image]: https://www.codetriage.com/hackmdio/hackmd/badges/users.svg
[codetriage-url]: https://www.codetriage.com/hackmdio/hackmd
+[poeditor-image]: https://img.shields.io/badge/POEditor-translate-green.svg
+[poeditor-url]: https://poeditor.com/join/project/1OpGjF2Jir
diff --git a/lib/config/index.js b/lib/config/index.js
index d885ee92..bdba5e0e 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 d8b0b4c5..070bde2d 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 d5c685ca..ae3e45fa 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,