Commit graph

3542 commits

Author SHA1 Message Date
Yannick Bungers
2c75de747f
Merge pull request #992 from hedgedoc/privateApi/me 2021-04-19 23:09:19 +02:00
Philip Molares
c3047509aa PrivateE2EMe: Add E2E test for private api /me routes
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-19 23:04:15 +02:00
Philip Molares
24ee95282d Entities: Add onDelete CASCADE to entities
To better handle deletion of entities, all necessary other entities got the option onDelete CASCADE set. So everything that does not make any sense if something else is deleted will be deleted along side of it.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-19 23:04:09 +02:00
David Mehren
51d6bd73ce
Merge pull request #1154 from hedgedoc/renovate/develop-lock-file-maintenance
Lock file maintenance (develop)
2021-04-19 22:52:10 +02:00
Renovate Bot
4ca112c4c0
Lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-19 20:47:15 +00:00
David Mehren
1707b43c80 Merge pull request #1149 from hedgedoc/renovate/develop-mkdocs-material-7.x
Update dependency mkdocs-material to v7.1.2 (develop)
2021-04-19 22:45:55 +02:00
Philip Molares
5758463b07 PrivateAPI: Add me controller
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-19 18:33:09 +02:00
Philip Molares
53d29c6e8a MediaService: Change deleteFile
The former deleteFile was moved to the public apis media controller and the actual deletion functionality was moved in a separate function to be called on user deletion.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-19 18:33:09 +02:00
Philip Molares
5f886b8a27 UsersService: Add unit tests
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-19 18:33:04 +02:00
Renovate Bot
3e2ab14c35
Update dependency mkdocs-material to v7.1.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-18 22:14:30 +00:00
Philip Molares
478e25e77c UsersService: Polish methods
Add test to createUser method to ensure an already used username triggers a AlreadyInDBError.
Add debug entry if user is deleted.
Add changeDisplayName method.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 22:49:24 +02:00
Philip Molares
c65ef80dd5 UsersService: Add JSDoc to all methods
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 22:49:24 +02:00
Philip Molares
e591a65945 UserEntity: Make userName unique
Each username should only be given once.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 22:49:24 +02:00
Yannick Bungers
eaa5254418
Merge pull request #1039 from hedgedoc/fix/permissionsCreationAndFinding 2021-04-18 22:45:24 +02:00
David Mehren
1785190f75
Merge pull request #1135 from hedgedoc/publicApi/swaggerUpload
PublicAPI: Add file upload dialog to openapi docs
2021-04-18 22:44:01 +02:00
Philip Molares
c6612f55c7 PublicNotesE2E: Add extra test for note deletion
This test checks if permission are correctly set and no error is thrown if the note is deleted.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 22:35:28 +02:00
Philip Molares
1aa9b5f915 NotesService: Get user and group of the permission
This also fetches to user and group of permissions and not only the `canEdit` property.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 22:35:28 +02:00
Philip Molares
85ed00e2c2 NotesService: Set Permissions
Set the necessary information for the permissions to be correctly inserted into the db.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 22:35:28 +02:00
Philip Molares
029dc0d7d6 Permissions: Add cascade
This makes it possible to create permissions by setting them in the note entity and delete them when either the user or note is deleted.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 22:35:25 +02:00
David Mehren
6699e4b0c8
Merge pull request #1131 from hedgedoc/improve/logging 2021-04-18 22:28:11 +02:00
David Mehren
32d9f21630
Merge pull request #1141 from hedgedoc/mediaBackend/webDAV 2021-04-18 22:22:28 +02:00
Philip Molares
2d86b149a0 Documentation: Add WebDAV media guide
This explains how to use the WebDAV media backend both in general and with a NextCloud in particular.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 21:54:40 +02:00
Philip Molares
6cc406281c MediaBackend: Add WebdavBackend
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 21:54:37 +02:00
Philip Molares
b490fe3ffc PublicAPI: Add file upload dialog to swagger api
This makes it possible to truly upload a file with swagger api documentation.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 21:02:06 +02:00
Yannick Bungers
9e772d83af
Merge pull request #1045 from hedgedoc/docs/notes
Add dev docs about notes
2021-04-18 21:00:55 +02:00
Philip Molares
6c1cda2c9a Config: Add WebDAV to media config
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 20:45:39 +02:00
Philip Molares
0ef9a338f3 UnitTests: Add appConfigMock
This is necessary as the Logger needs this config for the loglevel.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 18:50:57 +02:00
Philip Molares
a87408009d Logging: Handle calls with 'undefined' context
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 18:50:57 +02:00
Philip Molares
327206d60c Logging: Add LogLevels to ConsoleLoggerService
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 18:50:57 +02:00
Philip Molares
a039b85ff4 Utils: Add needToLog function
This functions makes it possible to make a partial order of the Loglevel enum. This simplifies the if statements in ConsoleLogger.
This is done, because the Loglevel enum already has a string backing for easy conversion from the config environmental variables and therefore can't also have a ordinal number assigned…

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 18:50:55 +02:00
Yannick Bungers
36dd89004b
Merge pull request #1144 from hedgedoc/docs/readme_update 2021-04-18 00:27:11 +02:00
David Mehren
0e5ce048a3
Merge pull request #1127 from hedgedoc/history/entryRename 2021-04-17 19:23:19 +02:00
David Mehren
ff27e988a6
Merge pull request #1136 from hedgedoc/fix/getServerVersion
Utils: Fix getServerVersionFromPackageJson
2021-04-17 16:03:52 +02:00
David Mehren
6668d73ba1
Merge pull request #1129 from hedgedoc/renovate/develop-lock-file-maintenance
Lock file maintenance (develop)
2021-04-17 15:51:42 +02:00
David Mehren
7dd4d41a73
Merge pull request #1146 from hedgedoc/renovate/develop-pin-dependencies
Pin dependency eslint-plugin-jest to 24.3.5 (develop)
2021-04-17 15:50:42 +02:00
David Mehren
5259912d6e
Explicitly state that 1.x is stable
Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-17 15:18:30 +02:00
Renovate Bot
75a4e6a4f3
Lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-17 13:01:52 +00:00
Renovate Bot
c94beba669
Pin dependency eslint-plugin-jest to 24.3.5
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-17 13:01:27 +00:00
David Mehren
2192153c30
Merge pull request #1133 from hedgedoc/eslint/tests 2021-04-17 14:18:44 +02:00
David Mehren
b04191f69f
Add clear 'getting started' instructions to README
Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-16 19:28:39 +02:00
David Mehren
97686613df
Merge pull request #1143 from hedgedoc/readme/paragraphSwitch
README: Change order of paragraphs
2021-04-16 19:09:29 +02:00
Philip Molares
608f110c8d README: Change order of paragraphs
With this change our support chat is mentioned before our dev chat. Hopefully that should direct people in the correct chat for them…

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-16 18:46:34 +02:00
Philip Molares
51f1da7083 Tests: Fix eslint errors
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-16 10:14:05 +02:00
Philip Molares
434bc55bab Tests: Removed all eslint-disable lines
As we now disable what we don't need in the eslint config, we don't need this anymore.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-16 10:14:05 +02:00
Philip Molares
5099f0f5c5 ESLint: Override config for tests
This is done to to fix Issue #1098

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-16 10:10:52 +02:00
Philip Molares
091d6ee9b4 Add dev docs about notes
fixes #864

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-15 22:20:27 +02:00
Philip Molares
2e1cbb3543 Dependency: Add eslint-plugin-jest
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-15 22:19:23 +02:00
David Mehren
67474a4777
Merge pull request #1140 from hedgedoc/renovate/develop-definitelytyped
Update dependency @types/node to v13.13.50 (develop)
2021-04-15 22:14:30 +02:00
Renovate Bot
24f4f41121
Update dependency @types/node to v13.13.50
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-15 20:08:26 +00:00
David Mehren
5f6e38efe0
Merge pull request #1139 from hedgedoc/renovate/develop-ts-jest-26.x
Update dependency ts-jest to v26.5.5 (develop)
2021-04-15 22:07:26 +02:00