Dataset
Durable, typed collections defined by kinds with versioned JSON Schemas. A Dataset can for example be an Address book, a calendar, a notes book, etc.
Glossary
| Term | Meaning |
|---|---|
| Dataset kind | Schema id + integer version; JSON Schema canonical |
| Dataset | Named collection of one kind; has Owner(s) |
| View | Field/row projection of a Dataset |
| Grant | Permission on a View: read / add / write / delete / share |
| Owner | Account(s) controlling Grants |
| Stale Dataset | No App/External Grants left — only Owners |
App Access
Apps never access raw storage and don’t run SQL. They access data through Host-enforced Views (field and row projections) and Grants (read, add, write, delete, or share) through the Wasm interface. Owners control sharing, and users give consent the first time an app requests access.
- A dataset can be created on request of the app. Then by default the app has read, add, write and delete access to that dataset and the user is defined as owner.
- An app might request an overview of existing datasets and what kind/schema they have. By default, discovery is on, but can turned off by the user. (So when the app asks for a list of datasets, the shell first asks the user if that list should be provided or which one should be shown to the app.)
- An app can request access to a specific dataset. Then the shell presents the question to the user, which can grant limited or full access.
- Via an app the sharing of a dataset, an entry in the dataset or a group of entries can be triggered. Then the shell asks if the user wants to grant that share. That’s of course only possible if the user is allowed to share it. There are different share options.
Grant Rights
A user that owns a dataset or has sharing rights to it, can grant other users, as well as external share links one of the following rights on the dataset or a subset (View):
- read: Allowed to read the data.
- write: Allowed to change existing entries but not to create new entries or delete existing entries. If the View is filtered for specific attributes, only that attributes can be written.
- add: Allowed to create new entries in the dataset. If a user has share access and adds an entry, they keep the right to read that entry, but for a share link, if the same link is opened another time, they can not see the created entry if they don’t have general read access, too. If the View is limited to specific attributes, the add right only allows to create entries with that attributes.
- delete: Allowed to delete entries that can be seen by the user/share link.
- share: Allowed to create share links or to grant any of the rights (including share but excluding unshare) to other users. Allowed to remove shares given by themselves.
- unshare: Allowed to remove grants, share links and views of the dataset for all other users. This automatically includes the share right. This right can only be given by other users with unshare rights.
Users only can grant access to what they are allowed to do themselves. If they have unshare rights on the full dataset, they are owner of that dataset. Multiple owners are possible.
Dataset overview
The user should have a list of all datasets and each dataset can have multiple views. The user is able through that view to change the grants on them.