Permission names
v0.0.1
Mishka Document gates its admin screens and its admin JSON:API with six permission names, created when a site is first set up. They split the extension into two areas: the workspace area for documents and their versions, and the section area for pages and everything that hangs off them. This reference lists each name, what it opens and which screens and widgets ask for it. For how names, wildcards and sites work, see How permissions work.
The six names
| Name | What it covers |
|---|---|
admin:dashboard:document:* | The whole document extension on the dashboard. |
admin:dashboard:document:workspace | Documents, their versions and version lineage, other users' follows, the workspace form on the Documents screen and the Workspace Versions screen. |
admin:dashboard:document:section | Pages, notes, drafts, tags, issues and issue comments, other users' bookmarks, page views, and their screens. |
admin:api:document:* | The whole document extension over the admin JSON:API. |
admin:api:document:workspace | The document, version and version lineage routes. |
admin:api:document:section | The page, note, draft, tag, issue and issue comment routes. |
A dashboard name counts only on the dashboard, and an api name only on the API. A wildcard that covers a name works in its place, such as admin:dashboard:*, admin:* or *. A site account holding a name has it on its own site only.
Screens
| Screen | Path | Opens for |
|---|---|---|
| Documents | /admin/dashboard/document | Either area |
| Workspace Versions | /admin/dashboard/document/workspace-version/:id | Workspace area |
| Sections | /admin/dashboard/document/sections/:workspace_version_id | Section area |
| Document Tags | /admin/dashboard/document/tags | Section area |
| Issues | /admin/dashboard/document/issues | Section area |
| Section Drafts | /admin/dashboard/document/section-drafts | Section area |
| Note Drafts | /admin/dashboard/document/note-drafts | Section area |
| Event Logs | /admin/dashboard/document/event-logs | Either area |
The sidebar shows Documents, under Plugins, to an account holding either area. The other screens are pages, not sidebar links.
On the Documents screen, the workspace area adds Add Workspace, Edit, Versions, Archive and the archived-list actions. The section area adds Open workspace and Sections, and the Reported Issues panel. An account holding one area sees the table, since it is how that account reaches its own screens. An account holding any other area is not let in.
The Event Logs screen shows each account the events of the records its area holds. A workspace admin reads document and version events, and a section admin reads the rest.
Records
| Area | Reads and writes |
|---|---|
| Workspace | Workspace, WorkspaceVersion, WorkspaceVersionLineage, and other users' document follows. |
| Section | Section, Note, SectionDraft, NoteDraft, Tag, section-tag links, Issue, IssueComment, other users' bookmarks, and section views. |
On the dashboard, a section admin also reads documents and versions, because every sections screen is drawn inside one. On the admin JSON:API the workspace routes are the workspace area's alone. A section admin reads no lineage on either surface. Copying a version, and making a copy independent, ask for the section area as well, because they write the pages and notes of the copy.
A signed-in reader manages its own bookmarks and follows over the JSON:API. Those routes are not part of the admin areas.
Dashboard widgets
Four widgets join the admin dashboard. Each is offered to holders of one area. The count each list shows is a setting of the person reading the board: the gear on the card in customize mode, or Settings, the Documents tab, Dashboard widgets.
| Widget | Area | Setting | Default | Range |
|---|---|---|---|---|
| Recent documents | Section | Documents to show | 5 | 1 to 12 |
| Version activity | Workspace | Versions to show | 12 | 3 to 30 |
| Open issues | Section | Issues to list | 5 | 1 to 12 |
| Workspaces | Workspace | None | None | None |
Setting up
Setting the documentation up, and saving an address on a document that has no pages there yet, write pages, components, a stylesheet, hooks and settings. They ask for admin:dashboard:runtime:page, admin:dashboard:runtime:component, admin:dashboard:runtime:stylesheet, admin:dashboard:runtime:js_hook and admin:dashboard:runtime:site. See Set up documents on a site.