Permissions
A plugin with a script does only what the user allowed. It lists what it
needs in plugin.toml, notesy asks before it first runs,
and every call it makes is checked against the answer.
#When notesy asks
The first time a plugin with a script loads, notesy shows what it asks for and waits: its script doesn't run until the user says yes. A plugin that only adds looks (themes, icons, syntax, colors, languages) runs nothing, so nothing is asked.
The prompt lists each permission and every site it can reach, and warns when a plugin can read what's yours and has a way to send it off: the network, opening links (a page's address can carry what it read), or sharing with other plugins.
#What each one lets it do
The ones in bold are shown in red when notesy asks.
| Permission | What it lets a plugin do |
|---|---|
notes.read |
Read your notes and their properties |
notes.write |
Create, change, rename and delete notes |
files.read |
Read the other files in your vault, like images and PDFs |
files.write |
Add, change and delete the other files in your vault |
editor |
Read and change the note you're editing, and where the caret is |
commands |
Add commands to the palette, with shortcuts, and run notesy's |
ui |
Add panels, tabs, status bar items, settings pages, right-click menu items, hover card parts and dialogs |
clipboard.read |
Read what you copy |
clipboard.write |
Put things on your clipboard |
notify |
Show notices |
links.open |
Open web pages in your browser |
accounts |
Sign you in to your accounts on the sites it names |
plugins.share |
Share what it chooses with the plugins that ask to hear it |
Three more come from other parts of plugin.toml, never listed by hand:
| Permission | Asked for by |
|---|---|
net |
Naming sites in [net]: it can connect to those, and only those |
markdown |
Naming languages in [contributes] blocks: it draws those blocks in your notes |
plugins.hear |
Naming plugins in [plugins] hears: it hears what they share |
#The network
A plugin reaches only the sites in its [net], through notesy's own fetch
(notesy::net). *.example.org means that site's
subdomains, not the site itself. Plain http goes only to this computer
and the local network, named as such. An account's token goes only to that
service's own sites, never to another the plugin names.
#Hearing other plugins
A plugin that hears another is approved against what that one could do at the time. When a plugin it hears is later allowed more, it stops until the user approves it again, seeing what changed.
#Updates
An update that asks for nothing new runs as before. One that asks for more, a permission or a site, waits for a yes to what's new, and the prompt shows only that.
#Changing your mind
Settings, Plugins has each plugin, what it may do, the sites it reached,
and its log. Turning one off stops it; turning it back on asks for
everything again. Removing it can keep its data or delete it too. What was
allowed is kept in plugins/grants.toml.
#In a script
A script gets only the modules its permissions cover: one that uses a module it wasn't given doesn't compile. Scripts lists which module needs which.
Every page
- Overview
- plugin.toml: Every field of plugin.toml
- Permissions: What a plugin can ask for, when notesy asks, and what changes it
- Scripts: How a script runs: its lifecycle, events, limits and errors
- Packing and installing: Making, checking, signing, packing and installing
- notesy::log: Lines for its log on the Plugins page
- notesy::events: Hearing what happens, and every event
- notesy::commands: Adding commands, and running notesy's
- notesy::store: Keeping its own data
- notesy::settings: Reading its settings
- notesy::secrets: Keys and tokens, in the system keychain
- notesy::notes: Reading and changing the vault's notes
- notesy::editor: The note in front
- notesy::files: A folder of its own
- notesy::links: Opening pages in the browser
- notesy::clipboard: Copying and pasting
- notesy::view: What panels, tabs and sections show
- notesy::panels and notesy::views: Adding side panels and tabs
- notesy::sections: Sidebar sections
- notesy::menus: Items in notesy's right-click menus
- notesy::status: Status bar items
- notesy::notices: Notices
- notesy::dialogs: Asking in a dialog, notesy's kinds or its own
- notesy::cards: Its part of the tree's hover cards
- notesy::boards: Boards' cards and arrows, and kinds of card of its own
- notesy::blocks: Drawing its fenced blocks
- notesy::icons: Drawing its own icons
- notesy::net: Requests to the sites it names
- notesy::accounts: Signing in to a service
- notesy::json: Reading and writing JSON
- notesy::toml: Reading and writing TOML
- notesy::yaml: Reading and writing YAML, and a note's front matter
- notesy::time: Now, written in the user's time zone, dates read, how long ago
- notesy::math: Trigonometry and the like, for drawing
- Names: Icon, Color, Tone, Side, Method, Command, Menu, Sidebar, Event: Notesy's names as enums
- notesy::preview: Its own screens for notesy preview
- notesy::perf: Timing its own work
- notesy::tex: Math macros for every note's formulas