Skip to content

Permission

type Permission = typeof FIXED[number] | `net:${string}`;

What a plugin can ask for in its manifest. The person accepts each permission when installing the plugin, and is asked again when an update asks for more. A call that needs a permission the plugin does not have throws PermissionDenied.

  • read: read the library (ctx.state, ctx.query), register hooks (ctx.hooks, ctx.editing), watch values (ctx.observe) and listen to events (ctx.notifications.subscribe).
  • write:rows: change rows, with ctx.dispatch, with the changes that hooks ask for afterwards, and with commands that change rows.
  • write:outlines: the same for outlines, areas and saved searches.
  • write:settings: change the settings of the library.
  • amend:outside: change a proposed change for things that do not belong to the plugin.
  • notifications: send events with ctx.notifications.post.
  • assets:read, assets:write: read and write attachments, such as images.
  • ui: ask the person questions and add things to the screen (ctx.ui).
  • jobs: run work in the background (ctx.jobs).
  • crypto: lock and unlock text with a key made from a password, or with a random key that can be cut in parts that are all needed (ctx.crypto).
  • crypto:friends: lock text for the devices of the person or for friends, and sign text (ctx.crypto.sealTo, open, sign, verify). The manifest must have a publisher, unless the plugin ships with the app.
  • audit: read the signed record of the changes of an outline (ctx.audit).
  • audit:grant: record who received the key of a shared outline.
  • audit:write: write a note in the signed record of an outline (ctx.audit.record), in the plugin’s own name.
  • net:<domain>: fetch from that one website, over https (ctx.net.fetch).