eikek
b041e2616d
Fix uploads with utf8 bytes in filenames
...
This adds a modified parser for `Content-Disposition` header to fix
issue #991 . The parser in http4s for `Content-Disposition` header
removes filenames that are sent as plain utf8 bytes. See also
http4s/http4s#5053 .
2021-11-07 22:11:00 +01:00
eikek
3e58d97f72
Add websockets and notify frontend when an item is processed
2021-11-06 21:32:30 +01:00
eikek
f38d520a1d
Hooking the new pubsub impl into the application
2021-11-06 01:44:06 +01:00
eikek
8fd86f9ec1
Don't allow shares with fulltext queries
...
Currently the query implementation cannot combine multiple/nested
fulltext searches within a query. It doesn't seem useful to have
shares based on fulltext searches, so it is disabled for now.
Issue: #446
2021-10-25 21:29:55 +02:00
eikek
668cd7d974
Refactor config validation
2021-10-25 11:27:06 +02:00
eikek
118d23c3a2
Add list of env variables to documentation
...
Issue: #1121
2021-10-25 00:23:20 +02:00
eikek
94b26a1721
Generate random server secret if not provided from config
2021-10-25 00:23:20 +02:00
eikek
4e5924d796
Refactor config loading and add config from environment
...
Issue: #1121
2021-10-24 23:02:39 +02:00
eikek
48d2bec9c4
Update http4s to 0.23.6
2021-10-24 18:24:03 +02:00
eikek
6696aba481
Show user shares when asking to delete user
2021-10-24 01:41:18 +02:00
eikek
2ac0b84e52
Link shares to the user, not the collective
...
The user is required when searching because of folders (sadly), so the
share is connected to the user.
2021-10-24 01:41:18 +02:00
eikek
337293128d
Add route to send mail for a share
2021-10-23 14:33:24 +02:00
eikek
f216c472ee
Detect how to display pdf files
...
Closes : #1099
2021-10-23 14:33:24 +02:00
eikek
1a10216e3d
Get item details from a share
2021-10-23 14:33:24 +02:00
eikek
9eb2f9c6fe
Implement binary routes for shares
2021-10-23 14:33:24 +02:00
eikek
813797756c
Extend search stats to fully populate search menu
...
Refs: #856
2021-10-23 14:33:24 +02:00
eikek
e961a5ac10
Use search stats to populate search menu
2021-10-23 14:33:24 +02:00
eikek
e52271f9cd
Implement share preview image
2021-10-23 14:33:24 +02:00
eikek
a286556116
Initial impl of search route
2021-10-23 14:33:24 +02:00
eikek
f4596db63d
Authorize share access
2021-10-23 14:33:24 +02:00
eikek
4ef9d6c3ff
Add expired flag to share details
2021-10-23 14:33:24 +02:00
eikek
c7d587bea4
Basic management of shares
2021-10-23 14:33:24 +02:00
eikek
f74624485f
Allow to manage passwords for a collective
2021-09-30 10:35:38 +02:00
eikek
40727d205a
Refactor occurrences folding streams of strings
2021-09-23 15:26:20 +02:00
eikek
1761526e20
Simplify MimeType class and parse mimetypes in a more lenient way
2021-09-23 14:10:24 +02:00
eikek
e31107eb49
Require a otp to disable 2fa
2021-09-23 09:27:44 +02:00
eikek
bbfc5b56d8
Document TOTP
2021-09-23 09:27:44 +02:00
eikek
4362301212
Fix base64 string in default config
...
While not being used, it is parsed and fails if it's not valid base64.
2021-09-22 19:48:10 +02:00
eikek
9013f2de5b
Update scalafmt settings
2021-09-22 17:23:24 +02:00
eikek
20a829cf7a
Refactoring for migrating to binny library
2021-09-22 14:18:43 +02:00
eikek
9785db0683
Change license header of all files
2021-09-21 22:35:38 +02:00
eikek
8df235e9db
Delete the user along its data
2021-09-08 20:57:10 +02:00
eikek
11de82402e
Add cross checks for the server config
2021-09-06 14:47:42 +02:00
eikek
4237caa755
Add some documentation for OIDC
2021-09-06 14:24:52 +02:00
eikek
28fdeb5a93
Fixing http redirect status codes
2021-09-06 11:40:47 +02:00
eikek
468ba90158
Fix OTP authentication for external accounts
2021-09-06 01:07:31 +02:00
eikek
8158e36d40
Improve logging and rename oauth->openid
2021-09-06 00:29:19 +02:00
eikek
984dda9da0
Add OpenID support to webapp
2021-09-05 23:43:07 +02:00
eikek
f8362329a9
Authenticate with external accounts using OIDC
...
After successful authentication at the provider, an account is
automatically created at docspell and the user is logged in.
2021-09-05 21:39:30 +02:00
eikek
aa099a340e
Remove unused code
2021-09-05 21:38:14 +02:00
eikek
aef56233a5
Add a new column to distinguish local from external users
2021-09-05 21:38:14 +02:00
eikek
b73c252762
Implement authentication via OpenIdConnect and OAuth2
...
The new subproject "oidc" handles all the details for working with an
OpenID Connect provider (like keycloak) or only OAuth2 - only
supporting the "Authorization Code Flow" for both variants.
2021-09-05 17:32:15 +02:00
eikek
1afc005a6c
Adopt login process for two-factor auth
2021-08-31 21:29:07 +02:00
eikek
309a52393a
Initial impl for totp
2021-08-31 16:45:39 +02:00
eikek
cf88f5c2de
Allow to specify ordering when retrieving meta data
...
The query now searches in more fields. For example, when getting a
list of tags, the query is applied to the tag name *and* category.
When listing persons, the query now also looks in the associated
organization name.
This has been used to make some headers in the meta data tables
clickable to sort the list accordingly.
Refs: #965 , #538
2021-08-27 23:04:54 +02:00
eikek
993a391c13
Add the attachment-only option to a source
...
The upload request can now contain a boolean for importing only
attachments when e-mails are uploaded. This option is now also added
to a source url.
Refs: #983
2021-08-23 14:19:11 +02:00
eikek
751fa3da5a
Add attachments-only filter to uploads
...
When uploading a file which is an e-mail, this option allows to skip
the mail body when the file is being processed.
2021-08-21 13:49:12 +02:00
Scala Steward
e4fecefaea
Reformat with scalafmt 3.0.0
2021-08-19 08:50:30 +02:00
eikek
85085ec173
Implement item merge
2021-08-16 12:32:54 +02:00
eikek
f4a2b86ea8
Use a minimum age of items to remove
...
In order to keep deleted items for a while, the periodic task can now
use a duration to only remove items with a certain age. This can be
used to ensure that a deleted item stays at least X days before it
will be removed from the database.
Refs: #347
2021-08-15 12:32:50 +02:00
eikek
31d885ed79
Refactor user tasks to support collective and user scopes
...
Before, there were periodic tasks run per collective and not user by
making sure that submitter + group are the same value. This is now
encoded in `UserTaskScope` so it is now obvious and errors can be
reduced when using this.
2021-08-14 22:07:56 +02:00
eikek
27fd7a5867
Make sure the empty-trash task is started for all collectives
2021-08-14 20:40:04 +02:00
eikek
4901276c66
Change "empty trash" settings for a collective and submit the job
2021-08-14 19:33:15 +02:00
eikek
f999662905
Add routes to restore deleted items
2021-08-14 16:48:03 +02:00
eikek
edb344314f
Use an enum instead of a boolean to differentiate search
...
It's not very likely to have more modes of search besides normal and
trashed, but got surprised in that way quite often and it's nicer this
way anyways.
2021-08-14 15:11:48 +02:00
eikek
a7b74bd5ae
Allow to search in soft-deleted items
...
A new query/request parameter can be used to apply a search to only
soft-deleted items.
The query expression `Trashed` has been introduced which selects only
items with state `Deleted`. This is another option an analog to
`ValidItemStates` (both cannot be used together as they would select
no items). This new query node is not added to the parser, because
users may not use it in their own queries - it must be part of the
"fixed" query so the application can control in which subset to search
(it would otherwise be possible to select any items).
2021-08-14 14:53:05 +02:00
eikek
cb777e30c0
Delete items by introducing a deleted state
...
When deleting items via the http api, they are not deleted anymore but
a new status "Deleted" is set. The collective insights contains now a
count separately for deleted items.
2021-08-14 14:18:03 +02:00
eikek
08ce6b5256
Fix path to viewerjs for pdf view
2021-08-13 00:58:13 +02:00
eikek
1901fe1a8c
Adopt deprecated APIs from fs2; use fs2.Path
2021-08-07 17:51:56 +02:00
eikek
9578dd2b2b
Add route to remove tags for a single item
2021-07-25 23:27:06 +02:00
eikek
fcef52856a
Allow tag ids or tag names when replacing tags
2021-07-25 21:26:22 +02:00
eikek
916217df4f
Make convert-all-pdfs an admin endpoint
2021-07-25 01:25:24 +02:00
eikek
f7eed33545
Return a 404 if a source was not found when checking a file
2021-07-08 21:17:48 +02:00
eikek
1120434cd9
Replace generating preview images with an admin endpoint
...
It doesn't make much sense to have this per collective, because this
is triggered by an admin after changing the server config file. So it
is now implemented as an admin endpoint that affects all files.
2021-07-04 21:37:34 +02:00
eikek
8e5c88fd32
Add copyright header to source files
2021-07-04 10:57:53 +02:00
eikek
7dcb61ef56
Use old ip checks and fix dev-ui-build script
...
These checks could be improved to not use javas InetAddress. But for
now it should have the same behaviour as before.
2021-06-26 14:43:16 +02:00
eikek
bd791b4593
Upgrade code base to CE3
2021-06-22 22:53:34 +02:00
eikek
bdc7822f50
Add documentation about docker setup
2021-05-31 22:19:49 +02:00
Eike Kettner
25788a0b23
Add routes for storing/retrieving client settings
2021-05-27 21:34:05 +02:00
Eike Kettner
a1a93e5ca6
Fixes searching items with fulltext
...
When using fulltext only search, then only the index must be searched.
This wasn't working anymore, because the routes added a query to
always select valid items (those not being processed). But this lead
to the downstream code to always consult the database, too. Since the
routes are using a "simple-search" interface, this is now adding the
valid-state condition if applicable. There are still more low-level
interfaces that can be used when searching should be done differently.
Closes : #823
2021-05-23 14:14:25 +02:00
Stefan Scheidewig
558197e415
Fixed the imports
2021-04-15 20:49:34 +02:00
Stefan Scheidewig
fa34312020
Implemented endpoint to delete multiple attachments
2021-04-15 18:05:01 +02:00
Stefan Scheidewig
93f772351a
Made multi id read logic sharable
2021-04-15 18:03:58 +02:00
Eike Kettner
3e0914ece7
Correctly count tag categories
...
If multiple tags of the same category are applied to the same item,
just summing tag counts will produce the wrong results as now items
are counted multiple times.
2021-04-11 14:34:44 +02:00
Scala Steward
144ea852bf
Update fs2-core, fs2-io to 2.5.4
2021-03-31 21:10:42 +02:00
Eike Kettner
c36073b852
Allow to give human readable summary to user tasks
2021-03-27 22:13:13 +01:00
Eike Kettner
03459124ca
Don't return items still in processing
2021-03-27 22:13:13 +01:00
Eike Kettner
cc38b850a6
Remove deprecated search routes and some refactoring
2021-03-27 22:13:13 +01:00
Eike Kettner
274e433d9d
Allow to change use enum for org/equipment
2021-03-10 23:55:18 +01:00
Eike Kettner
0229a867af
Add a use colum to metadata entities
2021-03-10 23:55:18 +01:00
Eike Kettner
1a188afbd7
Re-add ui-version to keep browser resource cache in service-worker
2021-03-10 23:16:01 +01:00
Eike Kettner
64e3cb04f3
Remove fomantic ui and ui-header handling
2021-03-09 22:45:29 +01:00
Eike Kettner
7b1ec97c97
Fix sort when using fulltext only
2021-03-08 00:47:15 +01:00
Eike Kettner
63d146c2de
Resolve fulltext search queries the same way as before
...
For now, fulltext search is only possible when being the only term or
inside the root AND expression.
2021-03-07 09:40:47 +01:00
Eike Kettner
d4006461f6
Serving scalajs artifacts and provide errors to js
2021-03-03 00:45:10 +01:00
Eike Kettner
dadab0d308
Implement search by query in endpoints
2021-03-01 15:31:02 +01:00
Eike Kettner
e079ec1987
Provide custom error structure for parse failures
2021-03-01 00:51:01 +01:00
Eike Kettner
9013d9264e
Add more convenient date parsers and some basic macros
2021-03-01 00:51:01 +01:00
Eike Kettner
af73b59ec2
Parser improvements
...
- default expressions into a and node
- fix parsing string lists that end in whitespace
- fix package names of internal classes
2021-03-01 00:51:01 +01:00
Eike Kettner
a80d73d5d2
Optimize imports
2021-03-01 00:51:01 +01:00
Eike Kettner
e9ed998e3a
Basic poc to search via custom query
2021-03-01 00:51:01 +01:00
Eike Kettner
186014a1c6
Refactor search to separate between a base query and user query
...
The `findBase` is adding only strictly required conditions. Everything
else comes from the user.
2021-03-01 00:51:01 +01:00
Eike Kettner
e6d9ce2c37
Remove obsolete type capabilities
...
These are now detected by the new scala compiler and lead to compile
errors.
2021-03-01 00:16:30 +01:00
mergify[bot]
9156e56d65
Merge pull request #651 from eikek/language-source
...
Add language to a source
2021-02-19 01:30:24 +00:00
Eike Kettner
7ef3185659
Add language to a source
...
Allows to define upload urls for different languages.
2021-02-18 23:34:42 +01:00
Eike Kettner
5c6f57cc6a
Trim values of some input data
...
Some values don't make sense when padded with whitespace, like
organization name, source ids etc. These are trimmed now when
received.
2021-02-18 22:07:32 +01:00
Eike Kettner
5181283b1b
Add a short-name to organizations
2021-02-17 22:55:35 +01:00
Eike Kettner
20ccdda609
Add a notes field to equipments
2021-02-17 22:39:07 +01:00
Eike Kettner
48eee00c0b
Allow person to be correspondent, concerning or both
2021-02-16 22:49:55 +01:00
Eike Kettner
f29353adb3
Use different worker cache name per ui
...
Avoid to have users clear their browser caches
2021-02-14 11:29:36 +01:00