hedgedoc/backend/src/realtime
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
..
realtime-note refactor: replace permission check methods with ordered permission enum 2023-05-19 19:10:45 +02:00
websocket refactor: replace permission check methods with ordered permission enum 2023-05-19 19:10:45 +02:00