feat(#447): permission-gated reader dashboard #477
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user