Lock order_lines writes (they were public)

order_lines had empty create/update/delete rules, so anyone could forge,
edit or delete the line items of real orders through the REST API. Writes
are now superuser-only (migration + pb_schema.json).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
This commit is contained in:
agent 2026-10-06 12:34:51 +00:00
parent bcb6cf80c7
commit 1f929c68ca
8 changed files with 36 additions and 263 deletions

View file

@ -1 +0,0 @@
export * from '$shared/server/basket';

View file

@ -1 +0,0 @@
export * from '$shared/server/pb-admin';

View file

@ -1,17 +0,0 @@
import Stripe from 'stripe';
import { env } from '$env/dynamic/private';
let stripe: Stripe | null = null;
export function getStripe(): Stripe {
if (!stripe) {
const key = env.STRIPE_SECRET_KEY;
if (!key) throw new Error('STRIPE_SECRET_KEY is not set');
stripe = new Stripe(key);
}
return stripe;
}
export function getCurrency(): string {
return env.STRIPE_CURRENCY || 'eur';
}