hedgedoc/backend
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
..
docker chore(deps): update node.js to 4559bc0 2023-05-17 02:21:52 +00:00
public
src refactor: replace permission check methods with ordered permission enum 2023-05-19 19:10:45 +02:00
test fix: increase test coverage 2023-05-07 20:45:15 +02:00
.editorconfig
.env
.eslintrc.js
.gitignore
.prettierrc.json
.prettierrc.json.license
CHANGELOG.md
jest-e2e.json
jest-e2e.json.license
nest-cli.json
nest-cli.json.license
package.json fix(deps): update dependency rimraf to v5.0.1 2023-05-18 03:43:38 +00:00
package.json.license
tsconfig.build.json
tsconfig.build.json.license
tsconfig.json
tsconfig.json.license