mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
Add support of allow anonymous config option with correspond modifications
This commit is contained in:
parent
cf8bae32d1
commit
5c7eb48319
6 changed files with 15 additions and 1 deletions
|
@ -763,6 +763,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.allowanonmyous) return;
|
||||
note.permission = permission;
|
||||
models.Note.update({
|
||||
permission: permission
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue