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 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-08 12:50:12 +02:00
committed by marcel
parent d554fc7e6b
commit eac2356948

View File

@@ -21,6 +21,8 @@ function settled<T>(res: PromiseSettledResult<unknown> | 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);