Compare commits

...

7 Commits

Author SHA1 Message Date
shamoon
94fe7a9e3d Bump version to 2.13.2 2024-10-29 11:09:19 -07:00
shamoon
9c9b4effe2 Merge branch 'dev' 2024-10-29 11:08:50 -07:00
github-actions[bot]
75f5007ede New Crowdin translations by GitHub Action (#8101)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-10-29 11:07:03 -07:00
github-actions[bot]
d95baf4e6b New Crowdin translations by GitHub Action (#8093)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-10-29 11:05:08 -07:00
shamoon
aac04e73b9 Fix: correct serializing of auth tokens for export (#8100) 2024-10-29 17:02:32 +00:00
shamoon
3af3484a00 Fix: cf query dropdown styling affecting other components (#8095) 2024-10-28 23:14:11 -07:00
github-actions[bot]
90e68af6cf Documentation: Add v2.13.1 changelog (#8085)
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-10-28 12:44:21 -07:00
17 changed files with 96 additions and 42 deletions

View File

@@ -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

View File

@@ -1,5 +1,47 @@
# Changelog
## paperless-ngx 2.13.1
### Bug Fixes
- Fix: allow removing dead document links from UI, validate via API [@shamoon](https://github.com/shamoon) ([#8081](https://github.com/paperless-ngx/paperless-ngx/pull/8081))
- Fix: Removes whitenoise patches and upgrades it to 6.8.1 [@stumpylog](https://github.com/stumpylog) ([#8079](https://github.com/paperless-ngx/paperless-ngx/pull/8079))
- Fix: Make all document related objects soft delete, fix filepath when deleted [@shamoon](https://github.com/shamoon) ([#8067](https://github.com/paperless-ngx/paperless-ngx/pull/8067))
- Fix: handle uuid fields created under mariadb and Django 4 [@shamoon](https://github.com/shamoon) ([#8034](https://github.com/paperless-ngx/paperless-ngx/pull/8034))
- Fix: Update filename correctly if the document is in the trash [@stumpylog](https://github.com/stumpylog) ([#8066](https://github.com/paperless-ngx/paperless-ngx/pull/8066))
- Fix: Handle a special case where removing none marker could result in an absolute path [@stumpylog](https://github.com/stumpylog) ([#8060](https://github.com/paperless-ngx/paperless-ngx/pull/8060))
- Fix: disable custom field signals during import in 2.13.0 [@shamoon](https://github.com/shamoon) ([#8065](https://github.com/paperless-ngx/paperless-ngx/pull/8065))
- Fix: doc link documents search should exclude null [@shamoon](https://github.com/shamoon) ([#8064](https://github.com/paperless-ngx/paperless-ngx/pull/8064))
- Fix: fix custom field query empty element removal [@shamoon](https://github.com/shamoon) ([#8056](https://github.com/paperless-ngx/paperless-ngx/pull/8056))
- Fix / Enhancement: auto-rename document files when select type custom fields are changed [@shamoon](https://github.com/shamoon) ([#8045](https://github.com/paperless-ngx/paperless-ngx/pull/8045))
- Fix: dont try to load PAPERLESS_MODEL_FILE as env from file [@shamoon](https://github.com/shamoon) ([#8040](https://github.com/paperless-ngx/paperless-ngx/pull/8040))
- Fix: dont include all allauth urls [@shamoon](https://github.com/shamoon) ([#8010](https://github.com/paperless-ngx/paperless-ngx/pull/8010))
- Fix: oauth settings without base url [@shamoon](https://github.com/shamoon) ([#8020](https://github.com/paperless-ngx/paperless-ngx/pull/8020))
- Fix / Enhancement: include social accounts and api tokens in export [@shamoon](https://github.com/shamoon) ([#8016](https://github.com/paperless-ngx/paperless-ngx/pull/8016))
### Maintenance
- Fix: Removes whitenoise patches and upgrades it to 6.8.1 [@stumpylog](https://github.com/stumpylog) ([#8079](https://github.com/paperless-ngx/paperless-ngx/pull/8079))
### All App Changes
<details>
<summary>12 changes</summary>
- Fix: allow removing dead document links from UI, validate via API [@shamoon](https://github.com/shamoon) ([#8081](https://github.com/paperless-ngx/paperless-ngx/pull/8081))
- Fix: Make all document related objects soft delete, fix filepath when deleted [@shamoon](https://github.com/shamoon) ([#8067](https://github.com/paperless-ngx/paperless-ngx/pull/8067))
- Fix: handle uuid fields created under mariadb and Django 4 [@shamoon](https://github.com/shamoon) ([#8034](https://github.com/paperless-ngx/paperless-ngx/pull/8034))
- Fix: Update filename correctly if the document is in the trash [@stumpylog](https://github.com/stumpylog) ([#8066](https://github.com/paperless-ngx/paperless-ngx/pull/8066))
- Fix: Handle a special case where removing none marker could result in an absolute path [@stumpylog](https://github.com/stumpylog) ([#8060](https://github.com/paperless-ngx/paperless-ngx/pull/8060))
- Fix: disable custom field signals during import in 2.13.0 [@shamoon](https://github.com/shamoon) ([#8065](https://github.com/paperless-ngx/paperless-ngx/pull/8065))
- Fix: doc link documents search should exclude null [@shamoon](https://github.com/shamoon) ([#8064](https://github.com/paperless-ngx/paperless-ngx/pull/8064))
- Enhancement: auto-rename document files when select type custom fields are changed [@shamoon](https://github.com/shamoon) ([#8045](https://github.com/paperless-ngx/paperless-ngx/pull/8045))
- Fix: fix custom field query empty element removal [@shamoon](https://github.com/shamoon) ([#8056](https://github.com/paperless-ngx/paperless-ngx/pull/8056))
- Fix: dont include all allauth urls [@shamoon](https://github.com/shamoon) ([#8010](https://github.com/paperless-ngx/paperless-ngx/pull/8010))
- Enhancement / fix: include social accounts and api tokens in export [@shamoon](https://github.com/shamoon) ([#8016](https://github.com/paperless-ngx/paperless-ngx/pull/8016))
- Fix: oauth settings without base url [@shamoon](https://github.com/shamoon) ([#8020](https://github.com/paperless-ngx/paperless-ngx/pull/8020))
</details>
## paperless-ngx 2.12.1
### Bug Fixes

View File

@@ -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;

View File

@@ -5,7 +5,7 @@ export const environment = {
apiBaseUrl: document.baseURI + 'api/',
apiVersion: '5',
appTitle: 'Paperless-ngx',
version: '2.13.1',
version: '2.13.2',
webSocketHost: window.location.host,
webSocketProtocol: window.location.protocol == 'https:' ? 'wss:' : 'ws:',
webSocketBaseUrl: base_url.pathname + 'ws/',

View File

@@ -5348,7 +5348,7 @@
<context context-type="sourcefile">src/app/components/common/input/document-link/document-link.component.html</context>
<context context-type="linenumber">50</context>
</context-group>
<target state="needs-translation">Not found</target>
<target state="translated">No trobat</target>
</trans-unit>
<trans-unit id="5676637575587497817" datatype="html">
<source>Search for documents</source>

View File

@@ -5348,7 +5348,7 @@
<context context-type="sourcefile">src/app/components/common/input/document-link/document-link.component.html</context>
<context context-type="linenumber">50</context>
</context-group>
<target state="needs-translation">Not found</target>
<target state="translated">Non trouvé</target>
</trans-unit>
<trans-unit id="5676637575587497817" datatype="html">
<source>Search for documents</source>

View File

@@ -3619,7 +3619,7 @@
<context context-type="sourcefile">src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html</context>
<context context-type="linenumber">79</context>
</context-group>
<target state="needs-translation">True</target>
<target state="translated">Vero</target>
</trans-unit>
<trans-unit id="3800326155195149498" datatype="html">
<source>False</source>
@@ -3635,7 +3635,7 @@
<context context-type="sourcefile">src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html</context>
<context context-type="linenumber">80</context>
</context-group>
<target state="needs-translation">False</target>
<target state="translated">Falso</target>
</trans-unit>
<trans-unit id="7551700625201096185" datatype="html">
<source>Search docs...</source>
@@ -3643,7 +3643,7 @@
<context context-type="sourcefile">src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html</context>
<context context-type="linenumber">96</context>
</context-group>
<target state="needs-translation">Search docs...</target>
<target state="translated">Ricerca di documenti...</target>
</trans-unit>
<trans-unit id="3184700926171002527" datatype="html">
<source>Any</source>
@@ -3691,7 +3691,7 @@
<context context-type="sourcefile">src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html</context>
<context context-type="linenumber">131</context>
</context-group>
<target state="needs-translation">Not</target>
<target state="translated">Non</target>
</trans-unit>
<trans-unit id="6548676277933116532" datatype="html">
<source>Add query</source>
@@ -3699,7 +3699,7 @@
<context context-type="sourcefile">src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html</context>
<context context-type="linenumber">150</context>
</context-group>
<target state="needs-translation">Add query</target>
<target state="translated">Aggiungi query</target>
</trans-unit>
<trans-unit id="5599577087865387184" datatype="html">
<source>Add expression</source>
@@ -3707,7 +3707,7 @@
<context context-type="sourcefile">src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html</context>
<context context-type="linenumber">153</context>
</context-group>
<target state="needs-translation">Add expression</target>
<target state="translated">Aggiungi espressione</target>
</trans-unit>
<trans-unit id="6052766076365105714" datatype="html">
<source>now</source>
@@ -4135,7 +4135,7 @@
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.html</context>
<context context-type="linenumber">19</context>
</context-group>
<target state="needs-translation">Order</target>
<target state="translated">Priorità</target>
</trans-unit>
<trans-unit id="4816216590591222133" datatype="html">
<source>Enabled</source>
@@ -4519,7 +4519,7 @@
<context context-type="sourcefile">src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html</context>
<context context-type="linenumber">13</context>
</context-group>
<target state="needs-translation">See &lt;a target='_blank' href='https://docs.paperless-ngx.com/advanced_usage/#file-name-handling'&gt;the documentation&lt;/a&gt;.</target>
<target state="translated">Vedi &lt;a target='_blank' href='https://docs.paperless-ngx.com/advanced_usage/#file-name-handling'&gt;la documentazione&lt;/a&gt;.</target>
</trans-unit>
<trans-unit id="1295614462098694869" datatype="html">
<source>Preview</source>
@@ -4539,7 +4539,7 @@
<context context-type="sourcefile">src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html</context>
<context context-type="linenumber">30</context>
</context-group>
<target state="needs-translation">Path test failed</target>
<target state="translated">Test percorso non riuscito</target>
</trans-unit>
<trans-unit id="9116034231465034307" datatype="html">
<source>No document selected</source>
@@ -4547,7 +4547,7 @@
<context context-type="sourcefile">src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html</context>
<context context-type="linenumber">32</context>
</context-group>
<target state="needs-translation">No document selected</target>
<target state="translated">Nessun documento selezionato</target>
</trans-unit>
<trans-unit id="2083498114116917092" datatype="html">
<source>Search for a document</source>
@@ -4555,7 +4555,7 @@
<context context-type="sourcefile">src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html</context>
<context context-type="linenumber">38</context>
</context-group>
<target state="needs-translation">Search for a document</target>
<target state="translated">Ricerca di un documento</target>
</trans-unit>
<trans-unit id="6423278459497515329" datatype="html">
<source>No documents found</source>
@@ -5348,7 +5348,7 @@
<context context-type="sourcefile">src/app/components/common/input/document-link/document-link.component.html</context>
<context context-type="linenumber">50</context>
</context-group>
<target state="needs-translation">Not found</target>
<target state="translated">Non trovato</target>
</trans-unit>
<trans-unit id="5676637575587497817" datatype="html">
<source>Search for documents</source>

View File

@@ -5473,7 +5473,7 @@
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.html</context>
<context context-type="linenumber">41</context>
</context-group>
<target state="needs-translation">Filter documents with these Tags</target>
<target state="translated">按标签过滤</target>
</trans-unit>
<trans-unit id="5752465522295465624" datatype="html">
<source>What&apos;s this?</source>
@@ -5537,7 +5537,7 @@
<context context-type="sourcefile">src/app/components/common/permissions-dialog/permissions-dialog.component.ts</context>
<context context-type="linenumber">75</context>
</context-group>
<target state="needs-translation">Any and all existing owner, user and group permissions will be replaced.</target>
<target state="translated"/>
</trans-unit>
<trans-unit id="5947558132119506443" datatype="html">
<source>My documents</source>

View File

@@ -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",

View File

@@ -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]]:

View File

@@ -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:

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -1,6 +1,6 @@
from typing import Final
__version__: Final[tuple[int, int, int]] = (2, 13, 1)
__version__: Final[tuple[int, int, int]] = (2, 13, 2)
# Version string like X.Y.Z
__full_version_str__: Final[str] = ".".join(map(str, __version__))
# Version string like X.Y