Commit graph

5298 commits

Author SHA1 Message Date
renovate[bot]
d7663e3090 chore(deps): update dependency eslint to v8.41.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-21 19:47:03 +02:00
renovate[bot]
9af8d5927c chore(deps): update dependency mkdocs-material to v9.1.14
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-20 14:12:32 +00:00
renovate[bot]
6e890d6f0d chore(deps): update dependency @codemirror/language to v6.7.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-19 19:34:21 +02:00
renovate[bot]
554f7bee56 fix(deps): update dependency i18next-resources-to-backend to v1.1.4
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-19 19:19:01 +02:00
Tilman Vatteroth
11ccd678de test: add test for permissions guard
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
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
Tilman Vatteroth
4e298cccfb refactor: make class fields of permissions guard read-only
They're only read and never written after the construction

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
Tilman Vatteroth
6e0e63688b refactor: allow only one required permission in require-permission decorator
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
Tilman Vatteroth
9ca6485219 refactor: extract permission metadata key
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
Tilman Vatteroth
488238d854 refactor: rename "Permissions" enum to "RequiredPermission"
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
Tilman Vatteroth
6b73016583 refactor: rename "Permissions" decorator to "RequirePermission"
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
Tilman Vatteroth
4c384cc8de test: add test for get note interceptor
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
Tilman Vatteroth
b1dc383a7a refactor: use "extractNoteFromRequest" in permission guard
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
Tilman Vatteroth
ab5aebc9c4 refactor: extract "extract note from request" logic into separate function
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
Tilman Vatteroth
65fb110a1e refactor: move permissions decorator and guard into permissions directory
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
Tilman Vatteroth
22f0abbfbe fix: remove redundant permission guard annotations
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-19 19:10:45 +02:00
renovate[bot]
1122a02f10 fix(deps): update dependency react-bootstrap-typeahead to v6.2.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-19 11:31:56 +02:00
renovate[bot]
751c96c068 fix(deps): update i18next
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-19 11:31:35 +02:00
renovate[bot]
f412107131 chore(deps): update dependency eslint-config-next to v13.4.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-19 11:31:21 +02:00
renovate[bot]
dfc3766678 chore(deps): update nextjs monorepo to v13.4.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-19 11:31:11 +02:00
renovate[bot]
4ed2812798 fix(deps): update dependency @uiw/react-codemirror to v4.20.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-19 11:30:42 +02:00
renovate[bot]
fe5edff238 fix(deps): update dependency vega-lite to v5.9.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-19 00:20:36 +00:00
renovate[bot]
8de7fcbdcb chore(deps): update dependency @codemirror/view to v6.12.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-18 09:21:42 +02:00
renovate[bot]
7d56347289 chore(deps): update dependency turbo to v1.9.8
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-18 09:07:52 +02:00
renovate[bot]
4b44277660 fix(deps): update dependency rimraf to v5.0.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-18 03:43:38 +00:00
renovate[bot]
2707c76fa3 chore(deps): update nestjs packages
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-17 21:55:02 +02:00
renovate[bot]
0cbcf2f23e fix(deps): update dependency @nestjs/schedule to v2.2.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-17 16:38:16 +00:00
renovate[bot]
4e5fc76690 chore(deps): update dependency @codemirror/view to v6.11.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-17 13:33:48 +00:00
renovate[bot]
dc56fe4cf1 fix(deps): update dependency vega-lite to v5.9.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-17 08:51:34 +00:00
renovate[bot]
c3806f3e5b chore(deps): update node.js to 4559bc0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-17 02:21:52 +00:00
renovate[bot]
203019afed chore(deps): update dependency mkdocs-material to v9.1.13
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-16 23:46:34 +00:00
renovate[bot]
bf97545b5d fix(deps): update nestjs packages
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-16 17:40:26 +02:00
renovate[bot]
3da7c6eb12 fix(deps): update dependency vega-lite to v5.9.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-16 17:40:01 +02:00
renovate[bot]
a4be190005 fix(deps): update dependency @types/node-fetch to v2.6.4
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-16 13:31:03 +00:00
renovate[bot]
54f4a0bd10 chore(deps): update dependency pymdown-extensions to v10.0.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-16 12:07:03 +02:00
renovate[bot]
500ab6d8b9 chore(deps): update typescript-eslint monorepo to v5.59.6
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-16 10:01:00 +00:00
renovate[bot]
fe8e7fbbf4 chore(deps): update dependency pymdown-extensions to v10 [security]
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-16 12:00:07 +02:00
renovate[bot]
91ad0a1697 chore(deps): update dependency turbo to v1.9.6
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-16 08:05:44 +00:00
renovate[bot]
99ada6ce5f chore(deps): update codecov/codecov-action action to v3.1.4
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-16 03:38:32 +00:00
Avinash
e73d28dba1 feat(backend): added test realtime note service
Signed-off-by: Avinash <avinash.kumar.cs92@gmail.com>
2023-05-15 20:49:59 +02:00
Avinash
d15a8b18d9 fix(backend): updated realtime connection's acceptEdit, close connection based on permission
Signed-off-by: Avinash <avinash.kumar.cs92@gmail.com>
2023-05-15 20:49:59 +02:00
renovate[bot]
c6e283a111 fix(deps): update dependency pg to v8.11.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-15 18:16:52 +02:00
Tilman Vatteroth
e3a3690b58 refactor(realtime): solve circle dependencies in realtime-user-status-adapter.ts
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-15 17:59:28 +02:00
Tilman Vatteroth
8cd93918e2 Revert "chore(deps): update dependency turbo to v1.9.4"
This reverts commit f97cfa6a18.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-15 15:53:44 +02:00
renovate[bot]
d94238a493 chore(deps): lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-15 07:01:29 +00:00
Tilman Vatteroth
8e65f74a07 fix: use replace in new page redirect
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-14 13:44:36 +02:00
Tilman Vatteroth
1df6eb7bf5 feat: add replace property to redirect
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-14 13:44:36 +02:00
Tilman Vatteroth
6ca0bd0668 refactor: use showif instead of ternary operator
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-14 13:44:36 +02:00
Philip Molares
472e775fd2 fix(frontend): new note button doesn't use /new anymore
This led to problems, if user clicked the back button in their browser. This implementation doesn't add functional routes in between new notes, but pushes the new note directly in the history.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-05-14 13:44:36 +02:00
renovate[bot]
eb4c531983 chore(deps): update ajinabraham/njsscan-action digest to 74e5a58
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-14 08:03:58 +02:00