Question · Vibe coding with Claude Code course · Module 14: Pinterest clone

Quiz: Prisma and RLS

The Supabase tables have RLS enabled with a policy for boards. Does the app still need canView in lib/boards.ts?

Answer options

  • Yes, because Prisma connects as the table owner or with bypassrls and bypasses RLS, so the routes still check access in code
  • No, RLS filters every query to the database, Prisma ones too
  • No, it is enough to keep the secret key out of the browser code
  • Only in development mode, in production RLS guards it

You can check the correct answer by solving this task in the CodeWorlds game.