Commit Graph

21 Commits

Author SHA1 Message Date
TAKIMOTO, Atsushi c7a15ecc66 Add allowAnonymousViews option
resolve #1144
set to `false` to delete `freely`, `editable` and `locked` permission when allowAnonymous is true (default is `true`)
Signed-off-by: hakoai <hakoai64@gmail.com>
2019-09-08 21:55:52 +09:00
BoHong Li f5c73d3439
refactor: fix lint on test/realtime/updateNote.test.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:35 +08:00
BoHong Li 5f5a26c497
refactor: fix lint on test/realtime/socket-events.test.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:35 +08:00
BoHong Li 8fc2059a09
refactor: fix lint on test/realtime/extractNoteIdFromSocket.test.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:34 +08:00
BoHong Li eaef11507c
refactor: fix lint on test/realtime/dirtyNoteUpdate.test.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:34 +08:00
BoHong Li 4d036b50a2
refactor: fix lint on test/realtime/connection.test.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:34 +08:00
BoHong Li 45f0bfa5d8
refactor: fix lint on test/realtime/cleanDanglingUser.test.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:33 +08:00
BoHong Li 79af236405
test: Note.update should returns an array
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-07-30 18:32:31 +08:00
BoHong Li a6036cb70b
refactor: back to use js-standard
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:08 +08:00
BoHong Li 1ac6434ab7
refactor(realtime): parseNoteIdFromSocket to async-await style function
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:08 +08:00
BoHong Li 17e82c11c9
refactor(realtime): connection flow to queue
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:07 +08:00
BoHong Li 0b03b8e9ba
refactor(realtime): ifMayEdit
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:07 +08:00
BoHong Li e773182db0
refactor(realtime): updateNote
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:07 +08:00
BoHong Li 2dedc84e28
refactor(realtime): extract "save note as revision" to job
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:06 +08:00
BoHong Li ab37a33e0b
refactor(realtime): add test case for clean dangling user
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:06 +08:00
BoHong Li d8b18ee241
refactor(realtime): disconnect flow
1. use queue for queueing disconnect request

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:06 +08:00
BoHong Li 0352057c8b
refactor(realtime): extract "update dirty note" to new job
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:05 +08:00
BoHong Li 702fc48fa8
refactor(realtime): extract "SocketClient" to separate class "RealtimeClientConnection"
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:05 +08:00
BoHong Li f317171aa0
refactor(realtime): extract user event "permission" to SocketClient
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:05 +08:00
BoHong Li 968c12ff6c
refactor(realtime: extract user event "delete" to SocketClient
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:04 +08:00
BoHong Li 79666aeec3
refactor(realtime): separate test case to individually file
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:04 +08:00