Permission module: effective visibility and permissions (#7) #20
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MassiveDynamic/kataba!20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/7-permissions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #7.
One module,
src/permissions/permissions.ts, answers who may see or do what with a guide or category (ADR-0002, ADR-0003):effectiveVisibility,canViewCategory,canViewGuide(drafts only for editors, deleted guides for nobody)canEditGuidecovers every owner capability: edit, publish, visibility, delete, wiki modecanCreateGuide,isAdmin,canManageCategories,canTransferOwnership,canRestoreGuidesThe category tree, the admin shortcuts and
requireAdminnow go through it. Vitest covers every rule from the ticket, including an owner who lost the author role and an internal ancestor above a public guide.🤖 Generated with Claude Code