Skip to content

🛡️ Warracker is an open source, self-hostable warranty tracker to monitor expirations, store receipts, files. You own the data, your rules!

Fix Paperless browse/link for non-admin users; correct void status mistranslations

Omega (QA)7835f4085479
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 24b2b12..f598974 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,10 @@
- _Files: `backend/statistics_routes.py`, `frontend/status.html`, `locales/*/translation.json`_
- **New 1.0.4 strings machine-translated into all 19 non-English locales:** the void status (8 keys), claim documents (10), and OIDC skip-login (2) strings were added to English only, so non-English UIs showed them in English. All 20 keys are now machine-translated (380 entries), with placeholder integrity verified. These are machine translations — native-speaker review is recommended for customer-facing polish.
- _Files: `locales/*/translation.json`_
+- **Paperless browse/link now visible to non-admin users:** the warranty forms read the Paperless enabled flag from the admin-only settings endpoint, which returns 403 for non-admins, so the browse sections and storage radios were hidden from every non-admin user on desktop and mobile — even though Paperless search-and-link itself is user-scoped. A new signed-in endpoint (`GET /api/paperless/status`) exposes only the enabled flag, never the Paperless URL or API token, and both frontend status checks now use it (admin settings remain as fallback).
+ - _Files: `backend/file_routes.py`, `frontend/js/components/paperless.js`, `frontend/script.js`_
+- **Void status mistranslations corrected:** the machine fill translated "Void" as emptiness in 14 locales (e.g. German "Leere", French "Vide", Russian "Пустота"), so voided cards read as "empty". The status word now reads as voided/invalid in those locales (e.g. German "Ungültig"), and the German and Portuguese void-warranty count labels are corrected as well. These are still unreviewed corrections — native-speaker review is recommended.
+ - _Files: `locales/*/translation.json`_
## 1.0.3 - 2026-10-02
diff --git a/backend/file_routes.py b/backend/file_routes.py
index bf8121b..1959bcf 100644
--- a/backend/file_routes.py
+++ b/backend/file_routes.py
@@ -664,6 +664,36 @@ def paperless_tags():
if conn:
release_db_connection(conn)
+@file_bp.route('/paperless/status', methods=['GET'])
+@token_required
+def paperless_status():
+ """
+ Paperless-ngx enabled flag for any signed-in user.
+
+ The warranty forms previously read this flag from the admin-only
+ /api/admin/settings endpoint, which returns 403 for non-admins, so
+ Paperless browse/link sections were hidden from every non-admin
+ user even though search-and-link itself is user-scoped. This
+ endpoint exposes only the enabled flag — never the Paperless URL
+ or API token — so the UI can show the sections to all users.
+ """
+ conn = None
+ try:
+ conn = get_db_connection()
+ with conn.cursor() as cur:
+ cur.execute(
+ "SELECT value FROM site_settings WHERE key = 'paperless_enabled'"
+ )
+ row = cur.fetchone()
+ enabled = bool(row and str(row[0]).lower() == 'true')
+ return jsonify({'paperless_enabled': 'true' if enabled else 'false'}), 200
+ except Exception as e:
+ logger.error(f"Error reading Paperless status: {e}")
+ return jsonify({'paperless_enabled': 'false'}), 200
+ finally:
+ if conn:
+ release_db_connection(conn)
+
@file_bp.route('/paperless/debug', methods=['GET'])
@admin_required
def paperless_debug():
diff --git a/frontend/js/components/paperless.js b/frontend/js/components/paperless.js
index 5803aa6..5c87814 100644
--- a/frontend/js/components/paperless.js
+++ b/frontend/js/components/paperless.js
@@ -103,6 +103,22 @@ export async function checkPaperlessNgxStatus() {
try {
const token = getAuthToken();
if (!token) return false;
+ // Any signed-in user may read the enabled flag (see
+ // GET /api/paperless/status). The old /api/admin/settings
+ // route is admin-only, so it hid Paperless browse/link from
+ // every non-admin user; it remains only as a fallback.
+ const statusResponse = await fetch('/api/paperless/status', {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ 'Content-Type': 'application/json',
+ },
+ });
+ if (statusResponse.ok) {
+ const status = await statusResponse.json();
+ paperlessNgxEnabled = status.paperless_enabled === 'true' || status.paperless_enabled === true;
+ window.paperlessNgxEnabled = paperlessNgxEnabled;
+ return paperlessNgxEnabled;
+ }
const response = await fetch('/api/admin/settings', {
headers: {
Authorization: `Bearer ${token}`,
diff --git a/frontend/script.js b/frontend/script.js
index df5c964..cf19d39 100644
--- a/frontend/script.js
+++ b/frontend/script.js
@@ -7053,6 +7053,26 @@ async function checkPaperlessNgxStatus() {
const token = localStorage.getItem('auth_token');
if (!token) return false;
+ // Any signed-in user may read the enabled flag (see
+ // GET /api/paperless/status). The old /api/admin/settings
+ // route is admin-only, so it hid Paperless browse/link from
+ // every non-admin user; it remains only as a fallback.
+ const statusResponse = await fetch('/api/paperless/status', {
+ method: 'GET',
+ headers: {
+ 'Authorization': `Bearer ${token}`,
+ 'Content-Type': 'application/json'
+ }
+ });
+
+ if (statusResponse.ok) {
+ const status = await statusResponse.json();
+ paperlessNgxEnabled = status.paperless_enabled === 'true' || status.paperless_enabled === true;
+ window.paperlessNgxEnabled = paperlessNgxEnabled;
+ console.log('[Paperless-ngx] Integration status:', paperlessNgxEnabled);
+ return paperlessNgxEnabled;
+ }
+
const response = await fetch('/api/admin/settings', {
method: 'GET',
headers: {
diff --git a/locales/ar/translation.json b/locales/ar/translation.json
index 9ed81d4..e5d5f48 100644
--- a/locales/ar/translation.json
+++ b/locales/ar/translation.json
@@ -235,7 +235,7 @@
"search_or_add_new_tag": "بحث أو إضافة علامة جديدة...",
"unnamed_product": "منتج غير مسمى",
"unvoid_warranty": "ضمان غير مبطل",
- "void": "فارغ",
+ "void": "باطل",
"void_warranty": "ضمان باطل"
},
"settings": {
diff --git a/locales/de/translation.json b/locales/de/translation.json
index d4a7953..cec3a86 100644
--- a/locales/de/translation.json
+++ b/locales/de/translation.json
@@ -225,7 +225,7 @@
"or_link_to_manual_url": "Oder verlinken Sie auf die manuelle URL",
"unnamed_product": "Unbenanntes Produkt",
"unvoid_warranty": "Ungültige Garantie",
- "void": "Leere",
+ "void": "Ungültig",
"void_warranty": "Garantie erlischt"
},
"settings": {
@@ -693,7 +693,7 @@
"archived_warranties": "Archivierte Garantien",
"total_value": "Gesamtwert",
"total_value_tooltip": "Summe der Kaufpreise aller Garantien, die weder archiviert noch für ungültig erklärt sind, gerechnet in Ihrer Standardwährung. Garantien ohne Währungsangabe zählen in Ihrer Standardwährung; Garantien mit einer anderen Währung sind nicht enthalten. Garantien ohne Kaufpreis zählen als 0.",
- "void_warranties": "Garantien erlöschen"
+ "void_warranties": "Ungültige Garantien"
},
"about": {
"title": "Über Warracker",
diff --git a/locales/es/translation.json b/locales/es/translation.json
index 027cbe8..1395f3c 100644
--- a/locales/es/translation.json
+++ b/locales/es/translation.json
@@ -225,7 +225,7 @@
"or_link_to_manual_url": "O enlace a la URL manual",
"unnamed_product": "Producto sin nombre",
"unvoid_warranty": "Garantía no nula",
- "void": "Vacío",
+ "void": "Nula",
"void_warranty": "Garantía nula"
},
"settings": {
diff --git a/locales/fr/translation.json b/locales/fr/translation.json
index c443b90..a550da4 100644
--- a/locales/fr/translation.json
+++ b/locales/fr/translation.json
@@ -225,7 +225,7 @@
"or_link_to_manual_url": "Ou un lien vers une URL manuelle",
"unnamed_product": "Produit sans nom",
"unvoid_warranty": "Annuler la garantie",
- "void": "Vide",
+ "void": "Annulée",
"void_warranty": "Annuler la garantie"
},
"settings": {
diff --git a/locales/hi/translation.json b/locales/hi/translation.json
index 49dee99..18f5921 100644
--- a/locales/hi/translation.json
+++ b/locales/hi/translation.json
@@ -225,7 +225,7 @@
"or_link_to_manual_url": "या मैन्युअल यूआरएल से लिंक करें",
"unnamed_product": "अनाम उत्पाद",
"unvoid_warranty": "निरर्थक वारंटी",
- "void": "खालीपन",
+ "void": "रद्द",
"void_warranty": "शून्य वारंटी"
},
"settings": {
diff --git a/locales/it/translation.json b/locales/it/translation.json
index ea64c0b..cf77be7 100644
--- a/locales/it/translation.json
+++ b/locales/it/translation.json
@@ -490,7 +490,7 @@
"search_or_add_new_tag": "Cerca o aggiungi un nuovo tag...",
"unnamed_product": "Prodotto senza nome",
"unvoid_warranty": "Garanzia non valida",
- "void": "Vuoto",
+ "void": "Nulla",
"void_warranty": "Garanzia nulla"
},
"actions": {
diff --git a/locales/ja/translation.json b/locales/ja/translation.json
index ad244f8..d6707ba 100644
--- a/locales/ja/translation.json
+++ b/locales/ja/translation.json
@@ -225,7 +225,7 @@
"or_link_to_manual_url": "またはマニュアル URL へのリンク",
"unnamed_product": "名前のない製品",
"unvoid_warranty": "無効でない保証",
- "void": "空所",
+ "void": "無効",
"void_warranty": "無効な保証"
},
"settings": {
diff --git a/locales/nl/translation.json b/locales/nl/translation.json
index 7c2d295..6c44d0a 100644
--- a/locales/nl/translation.json
+++ b/locales/nl/translation.json
@@ -225,7 +225,7 @@
"or_link_to_manual_url": "Of link naar handmatige URL",
"unnamed_product": "Naamloos product",
"unvoid_warranty": "Ongeldige garantie",
- "void": "Leegte",
+ "void": "Ongeldig",
"void_warranty": "Garantie ongeldig"
},
"settings": {
diff --git a/locales/pl/translation.json b/locales/pl/translation.json
index 9a0834d..3a3f02e 100644
--- a/locales/pl/translation.json
+++ b/locales/pl/translation.json
@@ -225,7 +225,7 @@
"or_link_to_manual_url": "Lub link do ręcznego adresu URL",
"unnamed_product": "Nienazwany produkt",
"unvoid_warranty": "Nieunieważniona gwarancja",
- "void": "Próżnia",
+ "void": "Nieważna",
"void_warranty": "Nieważna gwarancja"
},
"settings": {
diff --git a/locales/pt/translation.json b/locales/pt/translation.json
index 51553d3..d688c47 100644
--- a/locales/pt/translation.json
+++ b/locales/pt/translation.json
@@ -225,7 +225,7 @@
"or_link_to_manual_url": "Ou link para URL manual",
"unnamed_product": "Produto sem nome",
"unvoid_warranty": "Garantia não anulada",
- "void": "Vazio",
+ "void": "Anulada",
"void_warranty": "Anular garantia"
},
"claims": {
@@ -747,7 +747,7 @@
"archived_warranties": "Garantias arquivadas",
"total_value": "Valor total",
"total_value_tooltip": "Soma dos preços de compra de todas as garantias que não estão arquivadas nem anuladas, calculada na sua moeda padrão. Garantias sem moeda usam a sua moeda padrão; garantias com outra moeda não são incluídas. Garantias sem preço de compra contam como 0.",
- "void_warranties": "Anular garantias"
+ "void_warranties": "Garantias anuladas"
},
"about": {
"title": "Sobre o Warracker",
diff --git a/locales/ru/translation.json b/locales/ru/translation.json
index 95f8921..93c972c 100644
--- a/locales/ru/translation.json
+++ b/locales/ru/translation.json
@@ -231,7 +231,7 @@
"or_link_to_manual_url": "Или ссылку на URL, указанный вручную.",
"unnamed_product": "Безымянный продукт",
"unvoid_warranty": "Отменить гарантию",
- "void": "Пустота",
+ "void": "Аннулирована",
"void_warranty": "Аннулирование гарантии"
},
"claims": {
diff --git a/locales/uk/translation.json b/locales/uk/translation.json
index dd13a77..24066b3 100644
--- a/locales/uk/translation.json
+++ b/locales/uk/translation.json
@@ -231,7 +231,7 @@
"or_link_to_manual_url": "Або посилання на ручну URL-адресу",
"unnamed_product": "Продукт без назви",
"unvoid_warranty": "Недійсна гарантія",
- "void": "Пустота",
+ "void": "Недійсна",
"void_warranty": "Недійсна гарантія"
},
"settings": {
diff --git a/locales/zh_CN/translation.json b/locales/zh_CN/translation.json
index 3a0b6da..baab3f3 100644
--- a/locales/zh_CN/translation.json
+++ b/locales/zh_CN/translation.json
@@ -225,7 +225,7 @@
"notes_title": "保修说明",
"unnamed_product": "未命名产品",
"unvoid_warranty": "保修无效",
- "void": "空白",
+ "void": "无效",
"void_warranty": "保修无效"
},
"settings": {
diff --git a/locales/zh_HK/translation.json b/locales/zh_HK/translation.json
index 9a708af..2ae530d 100644
--- a/locales/zh_HK/translation.json
+++ b/locales/zh_HK/translation.json
@@ -225,7 +225,7 @@
"or_link_to_manual_url": "或連結到手冊 URL",
"unnamed_product": "未命名產品",
"unvoid_warranty": "保固無效",
- "void": "空白",
+ "void": "無效",
"void_warranty": "保固無效"
},
"settings": {