hedgedoc/backend/src/realtime/realtime-note
Tilman Vatteroth a852c79947 refactor: replace permission check methods with ordered permission enum
This commit replaces the "mayWrite", "mayRead" and "checkPermissionOnNote"
functions with one that returns a sortable permission value.
This is done because many places in the code need to do actions based on the fact if
the user has no, read or write access. If done with the may-functions then the permission
data need to be looked through multiple times.

Also, the whole check code is split into more functions that are tested separately and make it easier
to understand the process.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
..
random-word-lists refactor: reimplement realtime-communication 2023-03-24 14:06:03 +01:00
test-utils refactor(realtime): solve circle dependencies in realtime-user-status-adapter.ts 2023-05-15 17:59:28 +02:00
realtime-connection.spec.ts refactor(realtime): solve circle dependencies in realtime-user-status-adapter.ts 2023-05-15 17:59:28 +02:00
realtime-connection.ts refactor(realtime): solve circle dependencies in realtime-user-status-adapter.ts 2023-05-15 17:59:28 +02:00
realtime-note-store.spec.ts refactor: save ydoc state in the database, so it can be restored easier 2023-03-24 16:03:55 +01:00
realtime-note-store.ts refactor: save ydoc state in the database, so it can be restored easier 2023-03-24 16:03:55 +01:00
realtime-note.module.ts fix(repository): Move backend code into subdirectory 2022-10-30 22:46:42 +01:00
realtime-note.service.spec.ts refactor: replace permission check methods with ordered permission enum 2023-05-19 19:10:45 +02:00
realtime-note.service.ts refactor: replace permission check methods with ordered permission enum 2023-05-19 19:10:45 +02:00
realtime-note.spec.ts refactor: test code of realtime 2023-04-04 18:29:20 +02:00
realtime-note.ts refactor: save ydoc state in the database, so it can be restored easier 2023-03-24 16:03:55 +01:00
realtime-user-status-adapter.spec.ts refactor(realtime): solve circle dependencies in realtime-user-status-adapter.ts 2023-05-15 17:59:28 +02:00
realtime-user-status-adapter.ts refactor(realtime): solve circle dependencies in realtime-user-status-adapter.ts 2023-05-15 17:59:28 +02:00