Technical notes on web development, DevOps, and AI integration.
1 article
The moderation gate never rejected anyone: an unmapped enum simply compared false forever, and read-only won by default.
TL;DR: A read-only badge appeared on all reviews because the frontend passed raw module enums like PARIWISATA into a gate expecting slugs like wisata, so the check silently failed and defaulted to read-only. The fix centralized enum-to-slug mapping in one TypeScript Record. Server-side, guardModule now enforces deny-by-default checks with tests locking in 403s and 404s.