From 0aff073e3e6637b243625dd477272e63b69e8307 Mon Sep 17 00:00:00 2001 From: s4luorth Date: Wed, 30 Sep 2026 11:15:12 +0200 Subject: [PATCH] Public-Recht: formats auch bei show_check lesbar Anonyme Leseberechtigung auf formats filterte nur active=true, wodurch die nicht oeffentlich bestellbaren Check-Formate (A5, DIN lang) im oeffentlichen Textmengencheck unsichtbar blieben. Jetzt: active ODER show_check. Co-Authored-By: Claude Opus 4.8 --- bootstrap/bootstrap.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrap/bootstrap.mjs b/bootstrap/bootstrap.mjs index 687dfaf..a68cec4 100644 --- a/bootstrap/bootstrap.mjs +++ b/bootstrap/bootstrap.mjs @@ -1196,8 +1196,11 @@ async function applyPermissions() { // Public (Gast): nur aktive Kataloge lesen const pubPol = await ensurePolicy('Public (Skrift)', { app: false }); await ensureAccess(null, pubPol.id); - for (const col of ['products', 'formats', 'motifs', 'price_items']) + for (const col of ['products', 'motifs', 'price_items']) await ensurePermission(pubPol.id, col, 'read', ['*'], { active: { _eq: true } }); + // formats: aktiv (Konfigurator) ODER show_check (Textmengencheck). Sonst blieben die + // nicht öffentlich bestellbaren Check-Formate (A5, DIN lang) für Anonyme unsichtbar. + await ensurePermission(pubPol.id, 'formats', 'read', ['*'], { _or: [{ active: { _eq: true } }, { show_check: { _eq: true } }] }); await ensurePermission(pubPol.id, 'pricing_settings', 'read'); // Service (Backend + Produktion): Jobs/Orders lesen + Status schreiben