diff --git a/docs/administration.md b/docs/administration.md index 61b3797f7..7624de41b 100644 --- a/docs/administration.md +++ b/docs/administration.md @@ -19,6 +19,8 @@ Options available to any installation of paperless: export. Therefore, incremental backups with `rsync` are entirely possible. + The exporter does not include API tokens and they will need to be re-generated after importing. + !!! caution You cannot import the export generated with one version of paperless in diff --git a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.scss b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.scss index a10c4658d..f38bb4002 100644 --- a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.scss +++ b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.scss @@ -5,26 +5,26 @@ } } -::ng-deep .ng-select-container { +:host ::ng-deep .ng-select-container { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; height: 100% !important; } -::ng-deep .rounded-end .ng-select-container { +:host ::ng-deep .rounded-end .ng-select-container { border-top-right-radius: var(--bs-border-radius) !important; border-bottom-right-radius: var(--bs-border-radius) !important; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; } -::ng-deep .ng-select { +:host ::ng-deep .ng-select { max-width: 100px; min-width: 35%; font-size: 14px; } -::ng-deep .doc-link-select { +:host ::ng-deep .doc-link-select { padding-top: 0 !important; border-top-right-radius: var(--bs-border-radius) !important; border-bottom-right-radius: var(--bs-border-radius) !important; diff --git a/src-ui/src/locale/messages.ca_ES.xlf b/src-ui/src/locale/messages.ca_ES.xlf index d5632f18f..a8174d0d1 100644 --- a/src-ui/src/locale/messages.ca_ES.xlf +++ b/src-ui/src/locale/messages.ca_ES.xlf @@ -5348,7 +5348,7 @@ src/app/components/common/input/document-link/document-link.component.html 50 - Not found + No trobat Search for documents diff --git a/src-ui/src/locale/messages.fr_FR.xlf b/src-ui/src/locale/messages.fr_FR.xlf index a9d15dddf..213fb249e 100644 --- a/src-ui/src/locale/messages.fr_FR.xlf +++ b/src-ui/src/locale/messages.fr_FR.xlf @@ -5348,7 +5348,7 @@ src/app/components/common/input/document-link/document-link.component.html 50 - Not found + Non trouvé Search for documents diff --git a/src-ui/src/locale/messages.it_IT.xlf b/src-ui/src/locale/messages.it_IT.xlf index 15689727a..084a24039 100644 --- a/src-ui/src/locale/messages.it_IT.xlf +++ b/src-ui/src/locale/messages.it_IT.xlf @@ -3619,7 +3619,7 @@ src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html 79 - True + Vero False @@ -3635,7 +3635,7 @@ src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html 80 - False + Falso Search docs... @@ -3643,7 +3643,7 @@ src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html 96 - Search docs... + Ricerca di documenti... Any @@ -3691,7 +3691,7 @@ src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html 131 - Not + Non Add query @@ -3699,7 +3699,7 @@ src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html 150 - Add query + Aggiungi query Add expression @@ -3707,7 +3707,7 @@ src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html 153 - Add expression + Aggiungi espressione now @@ -4135,7 +4135,7 @@ src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.html 19 - Order + Priorità Enabled @@ -4519,7 +4519,7 @@ src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html 13 - See <a target='_blank' href='https://docs.paperless-ngx.com/advanced_usage/#file-name-handling'>the documentation</a>. + Vedi <a target='_blank' href='https://docs.paperless-ngx.com/advanced_usage/#file-name-handling'>la documentazione</a>. Preview @@ -4539,7 +4539,7 @@ src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html 30 - Path test failed + Test percorso non riuscito No document selected @@ -4547,7 +4547,7 @@ src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html 32 - No document selected + Nessun documento selezionato Search for a document @@ -4555,7 +4555,7 @@ src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html 38 - Search for a document + Ricerca di un documento No documents found @@ -5348,7 +5348,7 @@ src/app/components/common/input/document-link/document-link.component.html 50 - Not found + Non trovato Search for documents diff --git a/src-ui/src/locale/messages.zh_CN.xlf b/src-ui/src/locale/messages.zh_CN.xlf index 067cde177..1d6b37417 100644 --- a/src-ui/src/locale/messages.zh_CN.xlf +++ b/src-ui/src/locale/messages.zh_CN.xlf @@ -5473,7 +5473,7 @@ src/app/components/common/input/tags/tags.component.html 41 - Filter documents with these Tags + 按标签过滤 What's this? @@ -5537,7 +5537,7 @@ src/app/components/common/permissions-dialog/permissions-dialog.component.ts 75 - Any and all existing owner, user and group permissions will be replaced. + My documents diff --git a/src/documents/management/commands/document_exporter.py b/src/documents/management/commands/document_exporter.py index 6a23a701a..79d7cca6f 100644 --- a/src/documents/management/commands/document_exporter.py +++ b/src/documents/management/commands/document_exporter.py @@ -24,7 +24,6 @@ from django.utils import timezone from filelock import FileLock from guardian.models import GroupObjectPermission from guardian.models import UserObjectPermission -from rest_framework.authtoken.models import Token if TYPE_CHECKING: from django.db.models import QuerySet @@ -271,7 +270,6 @@ class Command(CryptMixin, BaseCommand): "social_accounts": SocialAccount.objects.all(), "social_apps": SocialApp.objects.all(), "social_tokens": SocialToken.objects.all(), - "auth_tokens": Token.objects.all(), } if settings.AUDIT_LOG_ENABLED: @@ -570,11 +568,7 @@ class Command(CryptMixin, BaseCommand): value=manifest_record["fields"][field], ) - elif ( - MailAccount.objects.count() > 0 - or SocialToken.objects.count() > 0 - or Token.objects.count() > 0 - ): + elif MailAccount.objects.count() > 0 or SocialToken.objects.count() > 0: self.stdout.write( self.style.NOTICE( "No passphrase was given, sensitive fields will be in plaintext", diff --git a/src/documents/management/commands/mixins.py b/src/documents/management/commands/mixins.py index be0256ed6..a2ad326e4 100644 --- a/src/documents/management/commands/mixins.py +++ b/src/documents/management/commands/mixins.py @@ -108,13 +108,6 @@ class CryptMixin: "token_secret", ], }, - { - "exporter_key": "auth_tokens", - "model_name": "authtoken.token", - "fields": [ - "key", - ], - }, ] def get_crypt_params(self) -> dict[str, dict[str, str | int]]: diff --git a/src/documents/tests/test_management_exporter.py b/src/documents/tests/test_management_exporter.py index ff514a7d6..9697f0c03 100644 --- a/src/documents/tests/test_management_exporter.py +++ b/src/documents/tests/test_management_exporter.py @@ -8,6 +8,9 @@ from pathlib import Path from unittest import mock from zipfile import ZipFile +from allauth.socialaccount.models import SocialAccount +from allauth.socialaccount.models import SocialApp +from allauth.socialaccount.models import SocialToken from django.contrib.auth.models import Group from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType @@ -874,6 +877,23 @@ class TestCryptExportImport( password="mypassword", ) + app = SocialApp.objects.create( + provider="test", + name="test", + client_id="test", + ) + account = SocialAccount.objects.create( + user=User.objects.first(), + provider="test", + uid="test", + ) + SocialToken.objects.create( + app=app, + account=account, + token="test", + token_secret="test", + ) + call_command( "document_exporter", "--no-progress-bar", @@ -912,6 +932,9 @@ class TestCryptExportImport( self.assertIsNotNone(account) self.assertEqual(account.password, "mypassword") + social_token = SocialToken.objects.first() + self.assertIsNotNone(social_token) + def test_import_crypt_no_passphrase(self): """ GIVEN: diff --git a/src/locale/ca_ES/LC_MESSAGES/django.po b/src/locale/ca_ES/LC_MESSAGES/django.po index bd6dc7814..bc04c000b 100644 --- a/src/locale/ca_ES/LC_MESSAGES/django.po +++ b/src/locale/ca_ES/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-19 22:56-0700\n" -"PO-Revision-Date: 2024-10-22 00:30\n" +"PO-Revision-Date: 2024-10-29 12:12\n" "Last-Translator: \n" "Language-Team: Catalan\n" "Language: ca_ES\n" diff --git a/src/locale/fr_FR/LC_MESSAGES/django.po b/src/locale/fr_FR/LC_MESSAGES/django.po index 9266f2dfb..c0e9fe4b5 100644 --- a/src/locale/fr_FR/LC_MESSAGES/django.po +++ b/src/locale/fr_FR/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-19 22:56-0700\n" -"PO-Revision-Date: 2024-10-25 12:12\n" +"PO-Revision-Date: 2024-10-29 00:31\n" "Last-Translator: \n" "Language-Team: French\n" "Language: fr_FR\n" diff --git a/src/locale/it_IT/LC_MESSAGES/django.po b/src/locale/it_IT/LC_MESSAGES/django.po index 0019bd14d..b9be39cb4 100644 --- a/src/locale/it_IT/LC_MESSAGES/django.po +++ b/src/locale/it_IT/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-19 22:56-0700\n" -"PO-Revision-Date: 2024-10-20 05:58\n" +"PO-Revision-Date: 2024-10-29 18:05\n" "Last-Translator: \n" "Language-Team: Italian\n" "Language: it_IT\n" diff --git a/src/locale/pl_PL/LC_MESSAGES/django.po b/src/locale/pl_PL/LC_MESSAGES/django.po index 2f558af93..74c290b4a 100644 --- a/src/locale/pl_PL/LC_MESSAGES/django.po +++ b/src/locale/pl_PL/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-19 22:56-0700\n" -"PO-Revision-Date: 2024-10-26 12:11\n" +"PO-Revision-Date: 2024-10-29 12:12\n" "Last-Translator: \n" "Language-Team: Polish\n" "Language: pl_PL\n" @@ -23,7 +23,7 @@ msgstr "Dokumenty" #: documents/filters.py:334 msgid "Value must be valid JSON." -msgstr "" +msgstr "Wartość musi być prawidłowym JSON." #: documents/filters.py:353 msgid "Invalid custom field query expression" diff --git a/src/locale/zh_CN/LC_MESSAGES/django.po b/src/locale/zh_CN/LC_MESSAGES/django.po index 16c794db2..24531eee7 100644 --- a/src/locale/zh_CN/LC_MESSAGES/django.po +++ b/src/locale/zh_CN/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-19 22:56-0700\n" -"PO-Revision-Date: 2024-10-24 12:12\n" +"PO-Revision-Date: 2024-10-29 12:12\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n"