Module roles
Expand description
Presets: named grant sets. Roles are the built-in presets on a workspace; an agent’s default delegation and the foreign-device bound are presets too.
Modules§
- agent_
policy - What an agent is in a workspace, decided in one place.
- governance
- The workspace’s governance actions.
Structs§
- Preset
- A named grant set people pick instead of writing grants one by one.
- Rule
- One rule of a preset: a grant without its subject.
Enums§
- Preset
Error - A preset that cannot be assigned.
Constants§
- COMMENTS_
FIELD - The field holding comments, wherever a model keeps them. The Commenter preset covers it at any depth, so field edits and verbs published on it are what a commenter may do.
- DEVICE_
PANEL - The app a person’s device shows the session’s own state in: quick settings, which is a panel of the session’s rather than an app of its own.
- DEVICE_
PANEL_ GRANT - The id of the grant
device_panelmakes. - GOVERNANCE_
KIND - The kind of every governance action. Changing who may do what reaches beyond the document — it decides what other people see and do — so an agent’s default asks before it, and the wire never lets one through on an answer that would need asking.
- MODERATION_
FIELD - The field node every app’s moderation actions sit under (acting on other people’s content: removing their message, locking a channel). One rule on it covers every app’s moderation, so presets need no list of verbs.
- MODERATOR_
GOVERNANCE - The governance a Moderator may exercise: the membership actions and restrictions, on members ranked below Moderator, and stopping or restarting a bot, so a misbehaving bot can be halted without the authority to widen it.
- REACTIONS_
FIELD - The field holding reactions, wherever a model keeps them
(
tilo_resource::Reactions). Reacting is commenting’s smallest form, so the Commenter preset covers it at any depth too. - ROOM_
KIND - The kind id of the workspace’s own resource. Its actions are the workspace’s governance: membership, roles, grants and settings.
- SESSION_
APP - The app a person’s desktop session publishes its own functions as (the shell’s actions: windows, workspaces, its settings), on their device.
- SESSION_
APP_ GRANT - The id of the grant
session_appmakes. - SESSION_
KIND - The kind the session publishes its own resources under: the compositor’s state, the clipboard, the lock.
Functions§
- administrator_
grant - The grant that makes
personan administrator ofworkspace, given by its ownergranted_by: every governance action allowed, ongovernance_actions. - administrator_
grant_ id - The id of the grant that makes
personan administrator of a workspace. - administrator_
moderation_ grant - The grant that lets
person, an administrator ofworkspace, moderate it: every moderation action allowed, as a Moderator may, given besideadministrator_grantby its giver. It sits one level belowmoderation, where an Editor’s own role denies, so it decides every moderation action whatever that role says. - administrator_
moderation_ grant_ id - The id of the grant that lets an administrator moderate
person’s workspace. - agent_
default - An agent’s default delegation within the scope a person gives it: Read and Undoable allowed, Outside asks.
- agent_
turn - The authority an agent’s turn carries in
workspace: the preset ofagent_policy::ROLE_CAP, narrowed by the bound the agent’s record keeps (bound; empty follows the default, which is the cap’s own). The agent acts with its person’s grants bounded by them, so it changes what its person may change, never more than the cap allows, never more than its record bounds it to, and never the workspace’s governance. - app_
authorship - The grant making application
appan author of its own records inworkspace: it reads and changes what it keeps there as the person using it, and reaches nothing outside it. Another app’s actions in the workspace stay behind the workspace’s own grants and the person’s consent. Given when a person who may change the workspace opens the app. - assign_
preset_ verdict - The verdict on
actorassigning the saved grant setsetinworkspace: a grant on the set’s assign node allows that set alone, and otherwise the workspace’s grant action decides for every set, since assigning a set is granting what it holds. - block_
grant - The grant that keeps
personout ofworkspace: every kind denied on the whole workspace, given bygranted_by. - block_
grant_ id - The id of the grant that bans
personfrom a workspace. - comments
- Where comments live in a workspace, at any depth.
- current_
role_ grants grantswith each built-in role’s grants asrole_rulesdefines them now, so a role’s rules have one definition and reach workspaces written before they changed.- device_
panel - The grant letting the device’s panel,
DEVICE_PANEL, read what the session publishes for it inworkspace: the readings of its own resources that are nobody else’s to read, such as what the person copied. It reads them, and nothing about them: changing the device stays the person’s. - foreign_
device_ bound - What a person may do from a device that is not theirs, in any workspace: read and change content, ask first before reaching outside it, never govern.
- governance_
action - governance_
actions - Every governance action of
workspace:workspace:<id>/kind:tilo.room/action:*. More specific than the workspace’s resource, where the Editor’s rule denies governance, so a grant here decides each governance action whatever the grantee’s role says about the workspace’s resource. - is_
code_ defined - Whether
grantis one the code defines and every read of a stored policy restores (crate::WorkspacePolicy::with_current_roles): a built-in role’s, or part of the room’s make-up (session_app,device_panel). Whatever narrows a policy and reads it back narrows these again. - is_
device_ panel - Whether
grantis the onedevice_panelmakes: part of the workspace’s make-up, likesession_app’s. - is_
legacy_ administrator_ grant - Whether
grantis an administrator’s grant ofworkspacein the shape workspaces held beforeadministrator_grant: the owner’s lasting Allow on the workspace’s resource, where it decides nothing an Editor’s role does not already deny. Anything else under the id (a Deny, an expiring grant) is not one, so rewriting never widens it. - is_
role_ grant - Whether
grantis one of a built-in role’s grants: given to the role itself under arole:<role>:<index>id. Those are the code’s, fromrole_rules; a workspace’s own adjustments to a role are grants under other ids and custom presets assignpreset:ids, so neither is one. - is_
session_ app - Whether
grantis the onesession_appmakes: part of the workspace’s make-up, never one a person gave and may take back. - moderation
- Where moderation lives in a workspace, at any depth.
- preset_
assign_ node - The node of assigning the named grant set
nameinworkspace: a grant on it lets someone assign that one set, and nothing else of the workspace. - preset_
assigned - The set and rule a grant id assigns, when it places one of the workspace’s
saved grant sets:
preset:<mint>:<set>:<index>(Preset::assign). - reactions
- Where reactions live in a workspace, at any depth.
- restriction_
grant - The grant that stops
personchanging anything inworkspaceuntiluntil_ms(Unix milliseconds, exclusive): undoable changes and outside effects denied on the whole workspace, reading left alone. It lapses by itself, so a temporary restriction needs nobody to come back and lift it. - restriction_
grant_ id - The id of the grant that restricts
personin a workspace. - role_
answered - The role the workspace’s answers for
telling_nodesdescribe. A Commenter writes nowhere they ask, so reads as a Viewer. - role_
preset - role_
rules - The rules a role carries in
workspace. - session_
app - The grant making the desktop session’s own app,
SESSION_APP, one of the person’s own apps inworkspace: whatever the person may do there, it may do for them. It never reaches past the person it acts for, whose authority bounds every delegation. - telling_
nodes - What one who cannot read
workspace’s grants (a page) asks the workspace to learn its person’s role, in order: may they write anywhere in it, moderate it, and govern who holds which role.role_answeredreads the answers. - workspace_
resource - The workspace’s own resource:
workspace:<id>/kind:tilo.room. - workspace_
role_ grants - Every role’s grants for a new workspace, given by its owner. Ids are
role:<role>:<index>.