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 <noreply@anthropic.com>
This commit is contained in:
s4luorth
2026-09-30 11:15:12 +02:00
parent feb6b39cb6
commit 0aff073e3e

View File

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