From 6ae4b8bf1369bff8cc50325b66db66659d2718a5 Mon Sep 17 00:00:00 2001 From: Dario Ernst Date: Sat, 20 Jan 2018 15:05:05 +0100 Subject: Add option to enable `freely` permission in closed instance Before, closed disallowed guest edits completely, by removing the `freely` permission. This makes it possible to explicitely bring back guest-editing, but not guest-note-creation, to closed instances. Signed-off-by: Dario Ernst --- lib/realtime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/realtime.js') diff --git a/lib/realtime.js b/lib/realtime.js index e03e2d0b..c731e5b0 100644 --- a/lib/realtime.js +++ b/lib/realtime.js @@ -781,7 +781,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) return + if (permission === 'freely' && !config.allowanonymous && !config.allowanonymousedits) return note.permission = permission models.Note.update({ permission: permission -- cgit v1.2.3