From 4d8caddac1bfbb0cc4d8a8ab9ab7e304071d48fa Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 8 May 2026 12:50:12 +0200 Subject: [PATCH] docs(dashboard): comment isReader discriminant with ADR-007 pointer Felix and Elicit both flagged that the isReader formula had no in-code explanation at the point of definition; future maintainers adding a new permission level need a fast pointer to the architectural rationale. Co-Authored-By: Claude Opus 4.7 --- frontend/src/routes/+page.server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/routes/+page.server.ts b/frontend/src/routes/+page.server.ts index e19219ab..b217452f 100644 --- a/frontend/src/routes/+page.server.ts +++ b/frontend/src/routes/+page.server.ts @@ -21,6 +21,8 @@ function settled(res: PromiseSettledResult | undefined): T | null { export async function load({ fetch, parent }) { const { canWrite, canAnnotate, canBlogWrite } = await parent(); + // READ_ALL without WRITE_ALL or ANNOTATE_ALL — see ADR-007. + // BLOG_WRITE-only users land here too and see the drafts module on top. const isReader = !canWrite && !canAnnotate; const api = createApiClient(fetch);