Commit Graph

1259 Commits

Author SHA1 Message Date
Renovate Bot
844c453864 Update dependency ansi-regex to 5.0.1 [SECURITY] 2021-09-23 02:43:56 +00:00
Renovate Bot
489ef310f3 Update dependency nth-check to 2.0.1 [SECURITY] 2021-09-23 02:00:09 +00: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
860efcf06f Fix more license occurrences 2021-09-22 11:55:56 +02:00
eikek
9785db0683 Change license header of all files 2021-09-21 22:35:38 +02:00
eikek
193b81bf7d Fix version check
Refs: #1068
2021-09-21 22:07:19 +02:00
eikek
16b5655b54 Go back to old version scheme
Refs: #1039
2021-09-13 11:39:57 +02:00
eikek
506e9a0c36 Move sent mails when merging items
Fixes: 1055
2021-09-08 22:29:34 +02:00
eikek
a94aeff75c Add ui for showing data to be deleted for a user 2021-09-08 20:57:10 +02:00
eikek
e89b571ab2 Add a route to show what is deleted 2021-09-08 20:57:10 +02:00
eikek
736968b049 Fix adding a new user and don't allow to add non-local users
The user structure must provide the correct account source now.
2021-09-08 20:57:10 +02:00
eikek
8df235e9db Delete the user along its data 2021-09-08 20:57:10 +02:00
eikek
3650a7d20c Make sure DML statements use the correct logger
It also seems to be necessary now to add the space in the `WHERE`.
Normally, the `fr` interpolator would add spaces….
2021-09-08 20:56:18 +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
7edb96a297 Register external accounts
This creates the account if it doesn't exist yet; otherwise it's a
noop. Only valid for non-local accounts.
2021-09-05 21:38:14 +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
4e57be6dfd Fix endpoint path in openapi spec 2021-09-02 22:06:33 +02:00
eikek
3a5ef62715 Add missing sql changesets 2021-09-01 00:57:03 +02:00
eikek
9dfe7f30a0 Remove unused contact kind 2021-09-01 00:57:03 +02:00
eikek
1afc005a6c Adopt login process for two-factor auth 2021-08-31 21:29:07 +02:00
eikek
999c39833a Add user setting page for totp 2021-08-31 21:28:17 +02:00
eikek
309a52393a Initial impl for totp 2021-08-31 16:45:39 +02:00
eikek
2b46cc7970 Add a simple module for totps
This is a wrapper around the nice and minimal java-otp library [0].

[0] https://github.com/jchambers/java-otp
2021-08-31 16:45:39 +02:00
eikek
733096f979 Improve querying item results
The join to retrieve the attachment count per item turned out to be
very expensive. And it is not used anymore for the result, only to
support fulltext search. It is now removed from the query. The
DISTINCT keyword is also removed, because it is not necessary and it
is expensive. With the DISTINCT removed, a new index (provided in the
previous commit) can now be used to avoid sorting items.
2021-08-29 11:09:06 +02:00
eikek
a5a8c2553b Add indexes to better support certain queries 2021-08-29 00:38:12 +02:00
eikek
9812b8f6c8 Set new version to 21.12-SNAPSHOT 2021-08-28 12:54:44 +02:00
eikek
be510b0363 Set version to 0.26.0 2021-08-28 11:54:08 +02:00
eikek
637f11d0f6 Fix solr setup by adding a text_he field
This field is used for Hebrew language. Solr doesn't support it out of
the box. The new field type is just a very basic field using the
standard tokenizer and lowercase filter. It is very likely not
providing good results. Hebrew is really difficult and it requires at
least installing plugins for solr - this is out of scope for docspell.
Users can setup their solr however they like and run a re-index
afterwards.
2021-08-28 00:10:36 +02:00
mergify[bot]
3520a2ec26
Merge pull request #1037 from eikek/small-list-improvements
Allow to specify ordering when retrieving meta data
2021-08-27 21:18:47 +00: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
7b2fb70c04 Add missing data to insert statement
Closes: #1032
2021-08-27 22:51:34 +02:00
wallace
eab7fe57d2 Fix formatting with scalafmt 2021-08-24 02:24:20 +03:00
wallace
589c41003f Add hebrew document language 2021-08-24 01:19:42 +03:00
eikek
6bb6cad39d Test db migrations for all supported databases 2021-08-23 23:41:03 +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
mergify[bot]
45f6357f49
Merge pull request #1024 from eikek/enhance-search-mode
Enhance search mode to search in all items
2021-08-21 13:56:43 +00:00
eikek
d5022f883e Enhance search mode to search in all items 2021-08-21 15:45:14 +02:00
eikek
0a0dd80bdc Add new checkbox to scan mailbox form 2021-08-21 13:49:12 +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
eikek
5d33b3841a Add a task to check for updates periodically
It must be enabled and configured by the admin.

Refs: #990
2021-08-20 00:25:27 +02:00
eikek
90421599ea Fix storing empty-trash task
It was wrongly stored using RPeriodicTask directly, but the higher
level `UserTask` must be used instead, because this ensures a
correctly scoped periodic task using the `updateOneTask` method. Since
this is a system task, it can be given a fixed ID which makes it now
safe even if stored using RPeriodicTask directly.

The bug resulted in multiple empty-trash tasks to be inserted (on each
restart).

Refs: #347
2021-08-20 00:25:25 +02:00
Scala Steward
e4fecefaea
Reformat with scalafmt 3.0.0 2021-08-19 08:50:30 +02:00
eikek
8f23b68587 Add a qr code to the link of an item or attachment 2021-08-18 00:20:27 +02:00
eikek
f1445e797b Highlight search menu tabs that contain data
Refs: #966
2021-08-16 22:13:53 +02:00
eikek
cf10f63af4 Improve main view in home page 2021-08-16 17:00:57 +02:00
eikek
ac0603335f Improve merge items list
Allow to reorder for mobile and remove elements.
2021-08-16 16:00:43 +02:00
eikek
c7c488f0cc Fix position of merged attachments 2021-08-16 15:05:26 +02:00
eikek
21647e950d Add docs for merging items 2021-08-16 14:41:56 +02:00
eikek
9478152a94 Switch to search view after successful merge 2021-08-16 14:40:57 +02:00
eikek
a923351b09 Fix item merge when merging tags and text fields
Also hard delete the remaining items. They are empty (have no
attachments), because data is moved if possible. Doesn't make much
sense to keep them, because restoring them isn't much useful.
2021-08-16 14:40:52 +02:00
eikek
8099b78b0e Merge items in webui 2021-08-16 12:55:25 +02:00
eikek
85085ec173 Implement item merge 2021-08-16 12:32:54 +02:00
eikek
22d331f082 Integrate item merge dialog into home page 2021-08-16 12:32:54 +02:00
eikek
14e4a8f792 Fixup for deleting items
First, when checking for existence of a file, deleted items are not
conisdered.

The working with fulltext search has been changed: deleted items are
removed from fulltext index and are re-added when they are restored.
The fulltext index currently doesn't hold the item state and it would
mean much more work to introduce it into the index (or, worse, to
reprocess the results from the index). Thus, deleted items can only be
searched using database queries. It is probably a very rare use case
when fulltext search should be applied to deleted items. They have
been deleted for a reason and the most likely case is that they are
simply removed.

Refs: #347
2021-08-15 16:00:30 +02:00
eikek
bc6924fd5d Show delete/restore buttons conditionally
When only trashed items are selected, the "delete" button doesn't make
sense and vice versa.
2021-08-15 12:41:10 +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
ef31c90e34 Fix submitter column of a collective-scoped periodic job 2021-08-14 22:07:56 +02:00
eikek
4562c77152 Fix migration changeset name for h2 2021-08-14 22:07:56 +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
548dfb9a57 Fix openapi.yml where undefined query parameter 2021-08-14 20:40:04 +02:00
eikek
27fd7a5867 Make sure the empty-trash task is started for all collectives 2021-08-14 20:40:04 +02:00
eikek
50706c3d6d Add a task implementation to delete items 2021-08-14 19:33:18 +02:00
eikek
4901276c66 Change "empty trash" settings for a collective and submit the job 2021-08-14 19:33:15 +02:00
eikek
828e5cf703 Allow to restore deleted items in webui 2021-08-14 16:50:17 +02:00
eikek
f999662905 Add routes to restore deleted items 2021-08-14 16:48:03 +02:00
eikek
eede20b014 Display deleted items in the webui
The card renders a trash can in the top right corner and the detail
page shows a label and also this trash can.
2021-08-14 16:06:55 +02:00
eikek
3f1ff5c1ac Allow to search in deleted items 2021-08-14 15:35:17 +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
48d13a35fc Fix search summary to restrict on valid items 2021-08-14 14:09:07 +02:00
eikek
08ce6b5256 Fix path to viewerjs for pdf view 2021-08-13 00:58:13 +02:00
Renovate Bot
51c35bd7dd
Update dependency path-parse to 1.0.7 [SECURITY] 2021-08-12 11:22:06 +00:00
eikek
1901fe1a8c Adopt deprecated APIs from fs2; use fs2.Path 2021-08-07 17:51:56 +02:00
monnypython
52d601f595
Update Home.elm 2021-08-05 12:45:33 +02:00
monnypython
86515321a8
Update Color.elm 2021-08-05 12:38:01 +02:00
monnypython
5cf69fef6c
Update AddressForm.elm
Since organizations do not only exist in cities, "Ort" would probably be the more general term.
2021-08-05 12:28:06 +02:00
eikek
1256a6e8cf Allo wildcards when searching by attachment ids 2021-07-31 01:23:37 +02:00
eikek
1c3a1cc0dc Set version to 0.26.0-SNAPSHOT 2021-07-29 23:11:36 +02:00
eikek
fe06cc1e6b Set version to 0.25.1 2021-07-29 22:53:43 +02:00
eikek
c59d4f8a6d Add the japanese content field to solr
This is a follow up on #961. It was forgotten when the japanese
language was added.
2021-07-29 22:22:34 +02:00
eikek
e696c06656 Set version to 0.26.0-SNAPSHOT 2021-07-29 18:10:27 +02:00
eikek
17e49f40c7 Set version to 0.25.0 2021-07-29 17:47:53 +02:00
eikek
4af8dd0950 Preprocess japanese texts to find dates
Not very efficient, but should work to find the position of dates in
japanese text.
2021-07-29 01:35:15 +02:00
wallace
e8348e2809 Remove excessive spaces 2021-07-29 02:08:48 +03:00
wallace11
1095a7d56f
Add another Japanese test 2021-07-29 01:13:22 +03:00
wallace11
119a4ffdc9
Update Japanese tests with more sensible data 2021-07-29 01:08:48 +03:00
eikek
f994d4b248 Add japanese document language 2021-07-28 20:05:48 +02:00
eikek
09b224b07a Left align item separator and make it more prominent
Refs: #950
2021-07-27 18:10:46 +02:00
eikek
15b15666bf Allow to use the created timestamp in item queries
Refs: 925
2021-07-27 17:33:13 +02:00