1
0
Fork 0
Commit Graph

25 Commits

Author SHA1 Message Date
Jonny adfd9e5815 docs: add Zeitplanung-Auswahl implementation plan 2026-08-20 19:36:59 +02:00
Jonny e3d82e0cf6 docs: add Auftragsnummer implementation plan 2026-08-20 10:12:02 +02:00
Jonny eaa848f845 docs: add Ansprechpartner-Kontakt implementation plan 2026-08-19 12:06:26 +02:00
Jonny 6ef0842a62 docs: add Auftrag-Ersteller-anzeigen implementation plan 2026-08-19 10:11:29 +02:00
Jonny 91607baf7f docs: add pgTAP suite and /rebuild-master-stack reminder to plan's merge checklist 2026-08-18 17:48:04 +02:00
Jonny df79d9324e docs: correct plan/spec after discovering DB trigger also enforces mandatory photos
Task 2's implementer found that check_auftrag_status_transition() independently
blocks the zugewiesen->unterwegs transition below 8 photos, duplicating the
app-level check removed in Task 1. Insert a new Task 2 (migration + pgTAP test
update) and correct the "no schema change" claims accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCHRPWuV3bd37NJhW2NK6P
2026-08-18 16:00:14 +02:00
Jonny 6137dac74d docs: add Fahrtbeginn-Fotos-optional implementation plan 2026-08-18 14:53:16 +02:00
Jonny a2254ae539 docs: add Auftrag-Foto-Galerie implementation plan 2026-08-18 12:25:18 +02:00
Jonny 525c460a74 docs: add Nutzerverwaltung-Tabelle implementation plan 2026-08-17 16:49:52 +02:00
Jonny ca942958c0 docs: add Standorte/Fahrzeuge-Tabellen implementation plan 2026-08-17 14:47:23 +02:00
Jonny b70c1511f1 docs: add Login-per-Benutzername implementation plan 2026-07-16 08:29:19 +02:00
Jonny 5ad147088c docs: add Nutzerverwaltung implementation plan
Admin-Client mit Service-Role-Key, Validierung, Nutzerliste-Merge aus
profiles + auth.admin.listUsers, vier Server Actions und die Seite in
6 Tasks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 18:48:55 +02:00
Jonny cd6fa14551 docs: add Zeiterfassung implementation plan
Kommen/Gehen-Tabelle mit Column-Lockdown-Trigger, Pausenpauschale nach
§4 ArbZG, Aggregation, CSV-Export und Korrektur-Workflow in 9 Tasks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-13 15:53:20 +02:00
Jonny 70d68d6b6b docs: add Kanban-Dashboard implementation plan
7 tasks: RLS policy for disponent-sees-fahrer-profiles (needed for the
assignment picker), pure drag-permission helper, Kanban query layer,
result-based server actions for the board context (deliberately not
reusing the redirect-based form actions), the KanbanBoard component
with @dnd-kit/core, the Fahrer-Auswaehler dialog, and wiring into the
dashboard page.
2026-07-07 15:26:33 +02:00
Jonny ebbb5d67a4 docs: add Stammdaten (Orte/Fahrzeuge) implementation plan
7 tasks: validation helpers, query/mutation data layer, pgTAP RLS
coverage (a gap that predates this plan), Stammdaten page for Orte
and Fahrzeuge (list+create+edit), and inline quick-add for both on
the Auftrag-anlegen form. No schema/RLS changes - reuses existing
insert/update policies from the Auftragsverwaltung foundation.
2026-07-06 19:27:57 +02:00
Jonny 133308adf8 docs: fix curl login verification technique in plan
The plain form-urlencoded curl POST in the manual verification steps
does not work against a real Next.js Server Action (found during Task
3's manual verification). Documents the correct multipart/$ACTION_ID
technique and the test admin credentials in Global Constraints so
later tasks don't rediscover this.
2026-07-06 12:01:44 +02:00
Jonny cdacc76fb4 docs: add design-system implementation plan
7 tasks: Tailwind v4 setup + brand tokens, UI primitives + login,
mobile drawer navigation, dashboard, Aufträge-Liste + StatusBadge,
Auftrag-Detail, Auftrag-anlegen. Pure presentation layer, no
Server-Action/RLS/schema changes.
2026-07-06 09:55:23 +02:00
Jonny 0334fb4f10 docs: fix stornieren RLS gap and fahrtBeenden silent-noop found by security review
Task 2's fahrer UPDATE policy only constrains zugewiesen_an in its
WITH CHECK, not the status value itself, so a fahrer could set their
own assigned order straight to 'storniert' even though the spec
reserves cancellation for Disponent/Admin. Live-verified the gap
(UPDATE 1 as fahrer before the fix). Extends Task 4's trigger with a
role-gated check on the 'storniert' target status plus a regression
test (plan(12) -> plan(13)). Also hardens fahrtBeenden/stornieren in
Task 11 to check affected-row counts (matching uebernehmen's existing
pattern) instead of silently "succeeding" when RLS blocks a write for
an unauthorized caller.
2026-07-05 22:43:10 +02:00
Jonny ad15af965b docs: fix fahrtBeginnen photo write - upsert on partial index doesn't work
The plan's original upsert(onConflict: "auftrag_id,position") for
auftrag_fotos cannot work: PostgREST's onConflict generates an
unqualified ON CONFLICT clause that can't target Task 3's partial
unique index (position <> 'schaden'), and even a working ON CONFLICT
would hit RLS since only admin has UPDATE on auftrag_fotos. Switched
to plain insert with checked errors on both write paths, consistent
with the spec's "Loeschen/Ersetzen nur durch Admin" rule.
2026-07-05 22:19:02 +02:00
Jonny e52a499b71 docs: fix invalid hex digit in readonly test-fixture UUID (r -> 0) 2026-07-05 17:03:28 +02:00
Jonny b576c4e3b1 docs: fix RLS role-gating gaps found by automated security review
The fahrer UPDATE policy on auftraege, the fahrer INSERT policy on
auftrag_fotos, and the storage upload policy all lacked an explicit
public.user_role() = 'fahrer' predicate, so any authenticated role
(including the default readonly signup role) could exploit the
status='offen' clause to self-assign open orders. Also adds identity
binding (erstellt_von/uploaded_by = auth.uid()) on inserts, and a
column-lockdown check in Task 4's trigger so a fahrer can't smuggle
changes to abholort_id/zielort_id/fahrzeug_id/erstellt_von/
vorgaenger_auftrag_id into an otherwise-legitimate update.
2026-07-05 11:18:58 +02:00
Jonny f9bddc01a8 docs: add implementation plan for auftragsverwaltung sub-project
11 tasks covering the orte/fahrzeuge lookup pools, the auftraege
core table with RLS and a DB-enforced status transition trigger,
photo storage with RLS, and the driver/dispatcher-facing pages.
2026-07-05 10:53:57 +02:00
Jonny 16f8b09606 docs: correct plan for auth schema lockdown and missing grants
Self-hosted Supabase now revokes CREATE on the auth schema from the
migration role, so the RLS helper lives in public.user_role() instead
of auth.user_role(). Also documents the authenticated grants that
Task 2's schema was missing (RLS alone doesn't grant access).
2026-07-04 12:00:44 +02:00
Jonny 2f2f354402 docs: fix plan to prevent role privilege escalation via user metadata
Automated security review flagged that reading `role` from
raw_user_meta_data in the profiles trigger lets a user set their own
role at account-creation time in some GoTrue flows (OAuth, invites).
New users now always start as readonly; admins promote them
explicitly afterwards via SQL/table editor.
2026-07-04 11:42:16 +02:00
Jonny a1e08fb1d0 docs: add implementation plan for foundation (auth & roles)
Nine-task plan covering Next.js scaffold, Supabase schema/RLS/pgTAP,
the self-hosted Docker Compose stack, and the login/middleware/
dashboard flow that later subprojects build on.
2026-07-04 10:38:25 +02:00