{
  "id": 17388656,
  "title": "Five functions decide who may read a row in our app, and the answer for somebody else's row is 404",
  "url": "https://urgent.news/2026/10/31/five-functions-decide-who-may-read-a-row-in-our-app-and-the-answer",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-31T11:12:07.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/daniel_pertu/five-functions-decide-who-may-read-a-row-in-our-app-and-the-answer-for-somebody-elses-row-is-404-31ca"
  },
  "original_language": "en",
  "account": "The Nakodo app contains two halves: public pages accessible to all and a private section for individual accounts. All rows in the private section correspond to a single account. The access control for the private section resides in a single file, src/lib/auth.ts, consisting of 87 lines of code. This file includes five functions that determine whether a request can access a particular row. The most noteworthy aspect is the behavior when a request is denied access. For some requests, a 404 response is returned, indicating that the requested row does not belong to the currently signed-in user.",
  "summary": "Nakodo is a Next.js app with two halves. One half is 76 public pages that show the same thing to everybody, like how it works and pricing . The other half is behind a login and every row in it belongs to exactly one account. All of the second half's access control lives in one file, src/lib/auth.ts , 87 lines including comments. Thirty-seven files import it. There are five functions that answer…",
  "key_points": [
    "Five functions control access to rows in Nakodo app's private section",
    "Each function decides if a request can access a specific row",
    "Denied access results in 404 response for other users' rows"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}