Commit graph

6533 commits

Author SHA1 Message Date
Tilman Vatteroth
8fc59aad82 refactor: make permission service less complex
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-26 20:21:13 +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
Tilman Vatteroth
ef699a9123 fix: disconnect websocket if trying to send over closed connection
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-26 17:36:25 +02:00
David Mehren
57701b5d6c docs: add note about separate renderer domain
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-26 15:53:49 +02:00
David Mehren
80eb4c8a1a docs: change default session secret in docker deployment
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-26 15:53:49 +02:00
David Mehren
f7f052fca1 refactor: use separate env vars for frontend/backend port
As we moved to a combined .env file for simplicity, frontend and backend need to be configured with separate variables.

Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-26 15:53:49 +02:00
David Mehren
55f3bd9b60 refactor: move .env file to repo root
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-26 15:53:49 +02:00
Erik Michelson
408d82e280 enhancement(auth): better error message handling
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-26 15:43:39 +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
8e57188ab5 refactor(common): extract frontmatter code into commons
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-26 14:58:38 +02:00
Philip Molares
8bd7fd1be8 refactor(common): extract frontmatter code into commons
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-26 14:58:38 +02:00
Tilman Vatteroth
a78ac5f097 fix: use correct callback on websocket error
the error event of the websocket occurs if the connection is already closed.
Therefore, the disconnect call does nothing and the transporter won't throw the disconnected event.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-26 12:25:40 +02:00
renovate[bot]
c746495e5f chore(deps): pin dependencies
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-03-26 12:17:51 +02:00
renovate[bot]
37c57d67f0 chore(deps): update dependency @types/node to v18.15.10
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-03-26 09:17:34 +02:00
Tilman Vatteroth
b4f73c0f49 fix: convert realtime connection dialog into alert
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-25 16:41:25 +01:00
David Mehren
925bb85d2f build: add eslint rule forbidding TypeORM Equal constructor
TypeORMs Equal constructor is buggy and should not be used.
This introduces a ESLint rule that checks for that.

Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-25 16:29:14 +01:00
Erik Michelson
97389fe0c4 fix: useTranslation hook in react components
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-25 16:14:03 +01:00
Philip Molares
8d497bcfc5 feat(frontend): show own user in UsersOnlineSidebarMenu
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 15:27:38 +01:00
Erik Michelson
61032cb745 feat(editor): add basic codemirror autocompletion suggestions
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-25 15:13:24 +01:00
Philip Molares
4956a99ced refactor(frontend/commons): rename .test files to .spec
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 15:02:29 +01:00
Tilman Vatteroth
24b7514e25 feat: submit own style index on realtime user state set
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-25 13:11:40 +01:00
David Mehren
b538c2c2a3 docs: minor fixes for config docs
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-25 13:05:42 +01:00
David Mehren
520d0933cb docs: add getting started guide
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-25 13:05:42 +01:00
David Mehren
180ab897ec docs: add docker compose deployment
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-25 13:05:42 +01:00
Philip Molares
d7af10e4f4 test(cypress): fix owner of notes
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 12:59:58 +01:00
Philip Molares
759c906506 feat(frontend): deactivate delete note button if user is not owner
This button and its functionality only works if the user is the owner, so it doesn't make sense to make it possible to press it otherwise…

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 12:59:58 +01:00
Philip Molares
e7e81cf670 feat(frontend): deactivate permissions buttons if user is not owner
These buttons and their functionality only work if the user is the owner, so it doesn't make sense to make it possible to press them otherwise…

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 12:59:58 +01:00
Philip Molares
09e56a418e feat(frontend): deactivate alias buttons if user is not owner
These buttons and their functionality only work if the user is the owner, so it doesn't make sense to make it possible to press them otherwise…

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 12:59:58 +01:00
Philip Molares
107ec7a522 feat(frontend): add isOwner hook
This hook is used to determine if the current user is the owner of the note

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-03-25 12:59:58 +01:00
David Mehren
81531b6559 test: use correct note content
The `works with an existing note` test was refactored to use testSetup
notes, but didn't use the correct content to compare to.

It's unclear why this test is only failing now.

Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-25 12:43:27 +01:00
David Mehren
382e70bf7b fix: replace Equals constructor
TypeORMs Equals constructor is still broken, so this commit removes all remaining usages.

See https://github.com/hedgedoc/hedgedoc/issues/2467

Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-25 12:43:27 +01:00
Tilman Vatteroth
088f2905a5 fix(backend): Fix type errors in query builder mock
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-03-25 12:43:27 +01:00
renovate[bot]
e23f0ff259 fix(deps): update dependency typeorm to v0.3.12
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-03-25 12:43:27 +01:00
renovate[bot]
72840f0568 fix(deps): update dependency @svgr/webpack to v7
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-03-25 12:42:28 +01:00
Erik Michelson
b9f7e12c38 fix(landing-layout): links in the user-dropdown not working
We use a custom component for rendering the link (Dropdown.Item), therefore we need to set both passHref and legacyBehavior

See: https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2023-03-25 11:32:55 +01:00
renovate[bot]
620f55d1fe fix(deps): update dependency sharp to v0.32.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-03-25 10:27:44 +01:00
renovate[bot]
6aa1ac6861 chore(deps): update dependency @testing-library/dom to v9.2.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-03-25 10:27:26 +01:00
renovate[bot]
ed753d7955 fix(deps): update dependency @uiw/react-codemirror to v4.19.10
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-03-25 10:07:20 +01:00
renovate[bot]
da8424abdf chore(deps): update dependency @types/node to v18.15.9
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-03-25 10:07:12 +01:00
David Mehren
26da4c6327 docs: consistent Markdown formatting
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00
David Mehren
31969c56eb docs: add missing design docs disclaimer
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00
David Mehren
b5e64880cd docs: Add docker docs to navbar
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00
David Mehren
c278f6d78b docs: Split up 2.0.md and rename to dev_notes.md
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00
David Mehren
bec48f3c22 docs: Add frontend docs to navbar
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00
David Mehren
3c957e9b0e docs: Move 'Events' to design docs
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00
David Mehren
58f306a38c docs: Merge API Authentication docs
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00
David Mehren
1093da4a39 docs: Move 'Notes' to design docs
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00
David Mehren
c9f8285f57 docs: Move 'Configuration' to design docs
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00
David Mehren
162a8e8816 docs: Move 'User Profiles & Authentication' to design docs
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00
David Mehren
8bb39b8c6d docs: introduce 'Design Documents' category
These documents provide context for various application aspects.

This commit also fixes the indentation and missing lists in the mkdocs config.

Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00