forked from fahrPool/fahrPool
Security review (automated scan + Task 11 reviewer) found a fahrer could storniere their own assigned order because Task 2's fahrer UPDATE policy only constrains zugewiesen_an, never status. Adds a role-gated check to the status trigger (only admin/disponent may set status='storniert') plus a pgTAP regression test. Also hardens fahrtBeenden/stornieren to check affected-row counts instead of silently redirecting to a success page on a blocked update. Live-verified: fahrer storno attempt now rejected by the trigger; normal fahrer fahrtBeenden flow unaffected. db reset + test db (21/21), build, and npm test (17/17) all pass. |
||
|---|---|---|
| .. | ||
| 20260704092843_profiles.sql | ||
| 20260704095119_rls_profiles.sql | ||
| 20260704224211_add_profiles_update_with_check.sql | ||
| 20260705085814_orte_fahrzeuge.sql | ||
| 20260705090655_auftraege.sql | ||
| 20260705144530_auftrag_fotos.sql | ||
| 20260705145543_auftrag_status_trigger.sql | ||
| 20260705150911_auftrag_fotos_bucket.sql | ||