1852 Commits

Author SHA1 Message Date
Trenton H
a12e1b351a Small improvements to coverage 2023-06-06 13:18:13 -07:00
Trenton H
1b3492a01f Rewrites the email parsing to be more clear and concise.
Adds testing to use httpx mocked responses to stand in as a server even offline
2023-06-06 09:05:26 -07:00
shamoon
3dac2d9b41 Update index.py 2023-06-04 10:41:45 -07:00
jayme-github
16a0a7c73a Feature: Allow to filter documents by original filename and checksum (#3485)
* Allow to filter documents by original filename and checksum

This adds filters for the original filename and checksum of documents to
be able to to lazy checks if the file is already stored in paperless.

* Add tests for DelayedQuery

* Add checksum and original_filename to whoosh index and DelayedQuery

* Refactored DelayedQuery to reduce duplicate code
* Choose icontains for checksums as whoosh has no exact match query term
* Bumped index version

* Revert whoosh filtering logic to simpler structure, remove redundant tests

Revert "Revert whoosh filtering logic to simpler structure, remove redundant tests"

This reverts commit 86792174bfbc697f42b72c4b39ee9eba483bb425.

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2023-06-04 10:34:27 -07:00
shamoon
2b9d30cb68 Exclude consumer & AnonymousUser users from export manifest 2023-05-30 20:51:25 -07:00
shamoon
f425fe9d62 Merge pull request #3472 from paperless-ngx/fix-disable-date-suggestions
Fix: prevent date suggestion search if disabled
2023-05-30 07:48:03 -07:00
shamoon
5a52957aa9 Merge pull request #3473 from jayme-github/fix_original_filename
Make DocumentSerializer return the original_filename
2023-05-27 12:50:07 -07:00
jayme-github
47c8cf2afa Make DocumentSerializer return the original_filename
Make get_original_file_name return the original filename instead of the
public filename.
2023-05-27 21:35:58 +02:00
shamoon
b294153ef5 prevent date suggestion search if disabled 2023-05-27 10:51:30 -07:00
chrisblech
d5db39d553 consumer.py: read create_date from original file (instead of temp copy)
In line 328, `self.path` is set to a fresh written copy of the source file. This copy has a different timestamp (=now).

When using the source file's timestamp as `create_date`, it makes much more sense to ask for the timestamp from `self.original_path`
2023-05-26 14:16:27 -07:00
Trenton H
f7e6361206 Just in case, catch a sometimes nltk error and return the basic processed content instead 2023-05-24 19:34:49 -07:00
Trenton H
bad8d304cb Improves the logging mixin and allows it to be typed better 2023-05-23 17:16:39 -07:00
Trenton H
1396f25419 Updates handling of barcodes to encapsulate logic, moving it out of tasks and into barcodes 2023-05-22 06:52:31 -07:00
Trenton Holmes
2f12206911 Changes the error mode to replace instead of ignore, to better highlight where a problem happened 2023-05-13 09:29:18 -07:00
Trenton H
6722b6e31c Adds better handling for files with invalid utf8 content 2023-05-13 09:29:18 -07:00
shamoon
5a579ccf1c Merge pull request #3359 from paperless-ngx/feature-fix-autocomplete-respect-perms
Fix: respect permissions for autocomplete suggestions
2023-05-12 13:35:45 -07:00
shamoon
4a0d6c733d Respect permissions for autocomplete suggestions 2023-05-11 14:43:25 -07:00
shamoon
da8021045b Resolve CodeQL warnings 2023-05-11 12:56:01 -07:00
shamoon
0cfb436e57 Merge pull request #3309 from paperless-ngx/feature-owner-filtering
Feature: owner filtering
2023-05-11 10:05:51 -07:00
shamoon
cf7c979bb1 Merge pull request #3329 from paperless-ngx/feature-full-dynamic-counts
Enhancement: dynamic counts include all pages, hide for "Any"
2023-05-10 11:15:47 -07:00
shamoon
e54e552aad Merge pull request #3347 from paperless-ngx/fix/issue-3346
Fix: default frontend to current owner, allow setting no owner on create
2023-05-10 08:18:08 -07:00
shamoon
4443ba9d5e Default frontend to current owner, allow setting no owner on create 2023-05-09 19:53:34 -07:00
shamoon
ae0ae3d8db Apply code suggestions
Co-Authored-By: Trenton H <797416+stumpylog@users.noreply.github.com>
2023-05-09 19:48:19 -07:00
shamoon
4d84a0a87b Re-work filter editor, bulk editor & reset buttons 2023-05-09 19:48:04 -07:00
shamoon
2a65235e66 Support owner API query vars 2023-05-08 15:34:14 -07:00
shamoon
fce481620d Merge pull request #3345 from paperless-ngx/fix/issue-3341 2023-05-08 07:04:49 -07:00
shamoon
c446a98520 Fix PassUserMixin not properly being used in DocumentViewSet 2023-05-07 17:40:09 -07:00
shamoon
33400cd4f3 Add proper testing for *__id__in testing 2023-05-07 00:04:23 -07:00
shamoon
ab78b98d6a Add "all" property to results 2023-05-06 11:31:47 -07:00
shamoon
bd1f9acc62 Dynamic counts include all pages, hide for "Any" 2023-05-05 01:01:57 -07:00
shamoon
31080cec5c Fix note sorting, testing, bump search index version 2023-05-04 02:07:48 -07:00
shamoon
6b5fc2cb15 fix __in filtering 2023-05-04 02:07:16 -07:00
Trenton Holmes
e34b8c4b1f Replace usages of os.rename with shutil.move to properly handle cases where the source and dest arent't on the same filesystem 2023-05-01 07:28:52 -07:00
shamoon
902ae3597e Respect superuser for advanced queries, test coverage for object perms 2023-04-27 15:51:34 -07:00
shamoon
73ab23cca4 Merge pull request #3209 from paperless-ngx/fix/issue-3206
Fix: advanced search or date searching + doc type/correspondent/storage path broken
2023-04-27 10:09:20 -07:00
Moritz 'e1mo' Fromm
7c18f2086e Fix MixedContentTypeError in add_inbox_tags handler
The fact that Tags were fetched while the `view_documenttype` permission
was validated caused a MixedContentTypeError, thus the document
consumptio to fail because the list of available tags could not be
fetched.
2023-04-27 18:15:05 +02:00
shamoon
1419b07315 Testing for whoosh support for multi-object query vars 2023-04-27 08:47:36 -07:00
shamoon
789527caf1 Include multi object queries in whoosh searcher 2023-04-27 08:06:55 -07:00
shamoon
3c9a209031 Dont perform permissions queries by default 2023-04-27 07:06:49 -07:00
shamoon
d553b386dd Remove debug line 2023-04-27 01:24:22 -07:00
shamoon
1ba413b1bd Merge pull request #3199 from paperless-ngx/fix/issue-3197
Fix: permissions-aware statistics
2023-04-26 10:47:18 -07:00
shamoon
cc4a95a38e Respect permissions for statistics 2023-04-26 09:51:26 -07:00
shamoon
0fc125f6fd Use document owner for matching if set 2023-04-26 09:42:03 -07:00
Trenton H
aabcc9a1c4 Upgrades black to v23, upgrades ruff 2023-04-26 09:35:27 -07:00
Trenton H
30655f1b73 Fixes ruff not running isort against the codebase 2023-04-26 09:35:27 -07:00
shamoon
3a189b2f15 Merge pull request #3174 from paperless-ngx/fix/issue-3172
Fix: respect permissions on document view actions
2023-04-26 09:10:58 -07:00
Trenton H
98811df439 Make the importer a little more robust against some types of errors 2023-04-26 07:08:50 -07:00
shamoon
ceb985057c Respect permissions on document view actions 2023-04-25 22:49:37 -07:00
Trenton H
4105dfce8d Fixes StoragePath missing the owned or granted filter 2023-04-25 18:48:22 -07:00
shamoon
8c39514aab Merge branch 'main' into dev 2023-04-24 13:10:18 -07:00