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:
@@ -21,6 +21,8 @@ function settled<T>(res: PromiseSettledResult<unknown> | undefined): T | null {
|
|||||||
|
|
||||||
export async function load({ fetch, parent }) {
|
export async function load({ fetch, parent }) {
|
||||||
const { canWrite, canAnnotate, canBlogWrite } = await 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 isReader = !canWrite && !canAnnotate;
|
||||||
const api = createApiClient(fetch);
|
const api = createApiClient(fetch);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user