Commit graph

624 commits

Author SHA1 Message Date
David Mehren
79065b8d3f
Media E2E tests: Add error handling for upload cleanup
Previously, `fs.rmdir` was called multiple times on the same path,
even when the path was already deleted.
This causes test failures in Node 16.

This commit extracts the cleanup code into a utility function
and ensures that no error is thrown when the given path is already deleted.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-22 21:29:23 +02:00
Philip Molares
20f527eb80
GithubWorkflow: Removed build on Node 10
This is not helpful anymore, because node 10 is nearly at the end of its LTS and because ts-loader 9 has node 12 as it minimum supported version and this is a key part of this application.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-20 11:29:20 +02:00
Renovate Bot
380365fc82
Update dependency ts-loader to v9
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-19 22:32:09 +00:00
Philip Molares
1ed22ba4bf
PrivateE2EMe: Add E2E test for private api /me routes
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-20 19:01:04 +01:00
Philip Molares
e90e2a8e19
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-03-11 15:03:23 +01:00
Philip Molares
56a46f57fc
PrivateAPI: Add me controller
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-05 00:30:47 +01:00
Philip Molares
f6121b58e8
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-03-20 18:58:59 +01:00
Philip Molares
63fcca6c0d
UsersService: Add unit tests
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-05 00:30:19 +01:00
Philip Molares
b86a7c601d
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-03-05 00:30:03 +01:00
Philip Molares
bce0ca9d74
UsersService: Add JSDoc to all methods
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-05 00:26:57 +01:00
Philip Molares
5a9634400a
UserEntity: Make userName unique
Each username should only be given once.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-05 00:25:06 +01:00
Renovate Bot
7e5eaf977d
Lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-19 20:47:15 +00:00
Renovate Bot
e93b4f6030
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
5c138e4115
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-03-17 10:30:37 +01:00
Philip Molares
cbf0ce98dd
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-02 20:46:34 +02:00
Philip Molares
305a3f1bea
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-03-17 10:27:29 +01:00
Philip Molares
979154b8a5
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-03-17 10:26:42 +01:00
Philip Molares
aa41bebbf0
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-15 14:29:33 +02:00
Philip Molares
846bbeb390
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-14 00:19:09 +02:00
Philip Molares
edc62285a2
Logging: Handle calls with 'undefined' context
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-13 23:21:55 +02:00
Philip Molares
6fe10bab4c
Logging: Add LogLevels to ConsoleLoggerService
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-13 23:13:47 +02:00
Philip Molares
e9664b4aa7
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 12:29:15 +02:00
Philip Molares
697ca823d5
Logging: Remove NestConsoleLoggerService
This is not necessary anymore, because we can inject ConsoleLoggerService directly.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-02 19:08:30 +02:00
Philip Molares
8dd3a3d7dd
Logging: Add OpenAPI log messages
Let the user know where the OpenAPI docs can be found.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-02 17:40:44 +02:00
Philip Molares
ebc8d459fb
Logging: Improve mediabackend filesystem log message.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-02 17:38:22 +02:00
Philip Molares
892a66543e
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-16 13:23:09 +02:00
Philip Molares
9043e39dc6
MediaBackend: Add WebdavBackend
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-16 13:22:03 +02:00
Philip Molares
edf71cc177
Config: Add WebDAV to media config
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-16 13:19:13 +02:00
Philip Molares
157d9bb21c
Add dev docs about notes
fixes #864

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-18 13:49:25 +01:00
David Mehren
ad81e75da4
Explicitly state that 1.x is stable
Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-17 15:17:44 +02:00
David Mehren
9f293b4747
Add clear 'getting started' instructions to README
Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-16 19:22:50 +02:00
Philip Molares
c1d706b350
PrivateAPI: Add lastVisited to HistoryEntryImportDto
As the DTO is only for importing an existing history the lastVisited of those entries should also be posted.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-11 12:37:47 +02:00
Philip Molares
eeaa74b385
PrivateAPI: Add pinStatus to HistoryEntryImportDto
As the DTO is only for importing an existing history the pinStatus of those entries should also be posted.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-10 23:31:18 +02:00
Philip Molares
1154894876
PrivateAPI: Rename HistoryEntryCreationDto to HistoryEntryImportDto
As the DTO is used to import a whole list of history entries rather than creating a single history entry (there is no way of doing that at the moment)

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-10 23:26:58 +02:00
Philip Molares
fa724c2603
Utils: Fix getServerVersionFromPackageJson
The cache is never null, because it defaults to undefined, and therefore this function always returns undefined.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-15 18:15:25 +02:00
Renovate Bot
4377376821
Lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-17 13:01:52 +00:00
Renovate Bot
7ca095b910
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
Philip Molares
9759d85fdd
Tests: Fix eslint errors
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-12 18:05:27 +02:00
Philip Molares
ff44a6567e
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-12 17:06:59 +02:00
Philip Molares
b8d106a4a2
ESLint: Override config for tests
This is done to to fix Issue #1098

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-12 17:02:47 +02:00
Philip Molares
1a8ae49e98
Dependency: Add eslint-plugin-jest
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-12 16:59:30 +02:00
Philip Molares
9360d8a26b
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:43:28 +02:00
Renovate Bot
58916ce243
Update dependency @types/node to v13.13.50
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-15 20:08:26 +00:00
Renovate Bot
f600ec8448
Update dependency ts-jest to v26.5.5
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-15 17:09:46 +00:00
Renovate Bot
fc6ceef9f2
Update linters
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-15 11:08:16 +00:00
Renovate Bot
484252b29e
Update dependency @types/node to v13.13.49
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-14 21:07:29 +00:00
Renovate Bot
600af87247
Update dependency typescript to v4.2.4
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-13 20:04:08 +00:00
Renovate Bot
f6a8eb2511
Update dependency mkdocs-material to v7.1.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-13 19:54:24 +00:00
Renovate Bot
b63c28c9cd
Update dependency @types/bcrypt to v3.0.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-09 22:42:57 +00:00
David Mehren
404f3ed3da
Update CHANGELOG.md to point to releases page
Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-08 17:00:50 +02:00