Yannick Bungers
f362d27d3f
Move session entity to sessions folder
...
Signed-off-by: Yannick Bungers <git@innay.de>
2023-07-06 12:07:44 +02:00
Philip Molares
0a8945d934
feat(backend): handle username always in lowercase
...
This should make all usernames of new users into lowercase. Usernames are also searched in the DB as lowercase.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-06-04 21:55:19 +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
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
Yannick Bungers
dad60a25ea
fix: change logging from id to publicId in media upload
...
Signed-off-by: Yannick Bungers <git@innay.de>
2023-05-07 20:45:15 +02:00
Yannick Bungers
001a49329c
refactor: extract permission checking from controllers and guard
...
Signed-off-by: Yannick Bungers <git@innay.de>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-07 20:45:15 +02:00
Yannick Bungers
485f7cd338
feat: Add guest file uploads and add deletion for note owners
...
Signed-off-by: Yannick Bungers <git@innay.de>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-07 20:45:15 +02:00
Yannick Bungers
0f464dedfe
fix: clean up decorators in the public notes.controller.ts
...
Signed-off-by: Yannick Bungers <git@innay.de>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-07 20:45:15 +02:00
Yannick Bungers
d369132519
fix: add CompleteRequest type to have better type checks for HTTP-Request attribute injection.
...
Signed-off-by: Yannick Bungers <git@innay.de>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-07 20:45:15 +02:00
Tilman Vatteroth
a5e12b9ad0
fix(backend): fix extraction body values in permission controllers
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-05-04 14:54:37 +02:00
Tilman Vatteroth
15374acb93
fix(backend): throw error if key in param decorator is not defined
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-31 15:43:28 +02:00
Tilman Vatteroth
0f8effd318
fix: use correct body parameter for permission controller
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-26 20:21:13 +02:00
Erik Michelson
ca9836d691
enhancement(auth): better error message handling
...
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-26 15:43:39 +02:00
Philip Molares
e01628cfb0
fix(backend): fix permission routes in NotesController
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-24 18:47:23 +01:00
Tilman Vatteroth
229d4a4a1d
fix: change sessionstate type to prevent unset values
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-19 22:45:44 +01:00
David Mehren
ebb8b10804
fix(public/notes-controller): extract canEdit parameter from body
...
Signed-off-by: David Mehren <git@herrmehren.de>
2023-02-19 20:56:18 +01:00
David Mehren
068517a73b
fix(public/notes-controller): bind setUserPermission to an URL
...
Signed-off-by: David Mehren <git@herrmehren.de>
2023-02-19 20:56:18 +01:00
Philip Molares
47d1765b12
refactor(backend): don't create local user if password is too weak
...
This prevents the previous problem that the backend created a user that was then not correctly removed again
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-01-15 18:15:28 +01:00
Philip Molares
c39a9430a2
feat(backend): add RegistrationDisabledError
...
This error is thrown by RegistrationEnabledGuard instead of directly throwing an http error.
The new RegistrationDisabledError is mapped to the Forbidden HTTP code 403, since this better represents the actual error.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-01-15 18:14:01 +01:00
Tamotsu Takahashi
396050c6cf
Set the session cookie after registering
...
Fix https://github.com/hedgedoc/react-client/issues/2524
Signed-off-by: Tamotsu Takahashi <ttakah+github@gmail.com>
2023-01-08 14:31:34 +01:00
David Mehren
b311265762
fix(media-controller): throw if no file was uploaded
...
Signed-off-by: David Mehren <git@herrmehren.de>
2022-12-30 11:02:56 +01:00
Tilman Vatteroth
bf30cbcf48
fix(repository): Move backend code into subdirectory
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-10-30 22:46:42 +01:00