Philip Molares
3ba9f95f83
test: fix test and use stronger passwords
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-10-03 10:36:46 +02:00
Philip Molares
6a56ce5541
feat: check password strength for local login
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-10-03 10:36:46 +02:00
Philip Molares
d7c58b9de5
feat: add PasswordTooWeak error
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-10-03 10:36:46 +02:00
Philip Molares
ac5e059243
feat: add minimalPasswordStrength to authConfig
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-10-03 10:36:46 +02:00
Philip Molares
5dffe35ea1
docs: add documentation about events
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-10-02 20:51:23 +02:00
Philip Molares
297469b49e
test: verify that event system is used
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-10-02 20:51:23 +02:00
Philip Molares
7798a77f6d
test: import EventEmitterModule
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-10-02 20:51:23 +02:00
Philip Molares
865c70b942
feat: handle note deletion and permission change via event system
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-10-02 20:51:23 +02:00
Philip Molares
77615f0878
feat: add EventEmitterModule to AppModule
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-10-02 20:51:23 +02:00
Philip Molares
35149e8a42
feat: add NoteEvent enum
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-10-02 20:51:23 +02:00
Philip Molares
1aa7dd618e
refactor: delete unused function useUnless
...
This function was introduced by 0da7d01dec
to proxy request to the frontend, but it's not used anymore and can therefore be removed.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-09-25 11:12:10 +02:00
Philip Molares
d75095bce4
test: add tests for methods in RealtimeNote
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-09-22 14:15:05 +02:00
Philip Molares
331747f61b
feat: add realtime announcements for permission changes and note deletion
...
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-09-22 14:15:05 +02:00
Philip Molares
c363d0834e
refactor: rename realtime-note-store.service.ts to realtime-note-store.ts
...
This was committed by mistake, the store should not have the extension `.service`
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-09-22 14:15:05 +02:00
Philip Molares
fd949a77b8
feat(permission): use new HD_GUEST_ACCESS config
...
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-09-18 21:29:35 +02:00
Philip Molares
754e725b7f
test(e2e): fix notes service
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-09-18 21:29:35 +02:00
Philip Molares
5cdc0edfb9
feat(group): add helper functions for special groups
...
This is syntactic sugar.
Co-Authored-By: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-09-18 21:29:35 +02:00
Philip Molares
f11f3b0931
test: default permissions on newly created notes
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-09-18 21:29:35 +02:00
Philip Molares
16c6f6e572
feat: add default permissions to newly created notes
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-09-18 21:29:35 +02:00
Philip Molares
df976b5fe1
feat(config): add config vars for default permissions for special groups
...
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-09-18 21:29:35 +02:00
Tilman Vatteroth
7dd093a44f
test: Add helper functions for creation of mock config
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-09-18 21:29:35 +02:00
Tilman Vatteroth
290fea2703
refactor(permissions): Add docs and simplify functions
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-09-18 21:29:35 +02:00
Philip Molares
bdedf783ec
refactor: remove additional copyright text
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-09-18 21:29:35 +02:00
Philip Molares
2ea2459c9b
test(unit): fix notes service
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-09-18 21:29:35 +02:00
David Mehren
4188b21685
docs: clarify comments for orphanedRowAction
...
Co-authored-by: Yannick Bungers <git@innay.de>
Signed-off-by: David Mehren <git@herrmehren.de>
2022-09-18 20:57:52 +02:00
David Mehren
a626ace4b9
fix(history-entry): remove composite primary keys
...
TypeORM promises to support composite primary keys,
but that does not work in reality.
This replaces the composite key used in the permission entities with
a single generated primary key and
a unique index on the relation columns.
See https://github.com/typeorm/typeorm/issues/8513
Signed-off-by: David Mehren <git@herrmehren.de>
2022-09-18 20:57:52 +02:00
David Mehren
d1c3058655
fix(permissions): remove composite primary keys
...
TypeORM promises to support composite primary keys,
but that does not work in reality.
This replaces the composite key used in the permission entities with
a single generated primary key and
a unique index on the relation columns.
See https://github.com/typeorm/typeorm/issues/8513
Signed-off-by: David Mehren <git@herrmehren.de>
2022-09-18 20:57:52 +02:00
David Mehren
2689f9f3dc
refactor(media-upload): explicitly use public note ID
...
Signed-off-by: David Mehren <git@herrmehren.de>
2022-09-18 20:42:26 +02:00
David Mehren
2c1e0517ff
refactor: use integer primary keys
...
Closes #1292
Signed-off-by: David Mehren <git@herrmehren.de>
2022-09-18 20:42:26 +02:00
Yannick Bungers
499f632d8d
Split methods getAuthTokenAndValidate
and createTokenForUser
...
Signed-off-by: Yannick Bungers <git@innay.de>
2022-09-18 20:11:51 +02:00
Philip Molares
87e2502c6e
feat: add permission routes to private api
...
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-09-11 20:08:24 +02:00
Philip Molares
eca22f5623
refactor(test): fix linting errors
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-08-29 02:47:12 +02:00
Philip Molares
ccacbd22b2
feat(private-api): add get note metadata call
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2022-08-28 13:02:33 +02:00
David Mehren
bbf7209c27
tests(test-setup): ensure shutdown hooks get run
...
Signed-off-by: David Mehren <git@herrmehren.de>
2022-08-07 22:45:25 +02:00
Tilman Vatteroth
4746c30c26
feat: persist notes on realtime note unload and on interval
...
The realtime note map has been moved into its own class
to separate the realtime note business logic from the storing logic.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-08-07 22:45:25 +02:00
renovate[bot]
62be0ba3c0
fix(session-entity): update for connect-typeorm v2
...
Signed-off-by: David Mehren <git@herrmehren.de>
2022-08-02 08:59:37 +02:00
Tilman Vatteroth
ce29cc0a2e
feat: add base implementation for realtime communication
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Philip Molares <philip.molares@udo.edu>
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-07-10 19:46:03 +02:00
Tilman Vatteroth
d9ef44766d
refactor: deduplicate code in history service unit test
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-07-10 19:46:03 +02:00
Tilman Vatteroth
57365bb727
refactor: move typeorm store into new session module
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-07-10 19:46:03 +02:00
Tilman Vatteroth
14ee7485ad
refactor: remove unused dependency on note module in permissions module
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-07-10 19:46:03 +02:00
Tilman Vatteroth
8596bed729
refactor: remove cycling dependency between notes and revisions
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-07-10 19:46:03 +02:00
David Mehren
c9cc1e2fb7
refactor: extract common app setup code
...
This allows the E2E tests and the real app to share the same setup.
Fixes #2083
Signed-off-by: David Mehren <git@herrmehren.de>
2022-06-26 20:43:23 +02:00
Lautaro Alvarez
a0b5da6c8b
refactor(media-apis): Implement a decorator to convert header to Note instance
...
Just find the related note in an Interceptor (in both public and private routes)
Related issue: https://github.com/hedgedoc/hedgedoc/issues/1594
Signed-off-by: Lautaro Alvarez <lautarolalvarez@gmail.com>
Signed-off-by: David Mehren <git@herrmehren.de>
2022-06-19 20:58:23 +02:00
David Mehren
06c39ea759
refactor: adapt for typeorm 0.3
...
Signed-off-by: David Mehren <git@herrmehren.de>
2022-06-12 20:09:07 +02:00
David Mehren
43d3f14322
Use new APIs in seed.ts
...
Signed-off-by: David Mehren <git@herrmehren.de>
2022-06-12 20:09:07 +02:00
David Mehren
d780d511cd
fix(notes-service): user query builder
...
For reasons, the typeorm 0.3 broke the find()
method when using relations in the WHERE clause.
This replaces the find method with a query builder.
Signed-off-by: David Mehren <git@herrmehren.de>
2022-06-12 20:09:07 +02:00
David Mehren
27a93a2895
fix(media-service): user query builder
...
For reasons, the typeorm 0.3 broke the find()
method when using relations in the WHERE clause.
This replaces the find method with a query builder.
Signed-off-by: David Mehren <git@herrmehren.de>
2022-06-12 20:09:07 +02:00
David Mehren
3503a45078
fix(history-service): user query builder
...
For reasons, the typeorm 0.3 broke the find()
method when using relations in the WHERE clause.
This replaces the find method with a query builder.
Signed-off-by: David Mehren <git@herrmehren.de>
2022-06-12 20:09:07 +02:00
David Mehren
366aead689
fix(revisions-service: user query builder
...
For reasons, the typeorm 0.3 broke the find()
method when using relations in the WHERE clause.
This replaces the find method with a query builder.
Signed-off-by: David Mehren <git@herrmehren.de>
2022-06-12 20:09:07 +02:00
David Mehren
c4975e4783
refactor: adapt for typeorm 0.3
...
Signed-off-by: David Mehren <git@herrmehren.de>
2022-06-12 20:09:07 +02:00