Skip to main content

Module permissions

Module permissions 

Source
Expand description

An optional permission layer with permissions stored in links (issue #149), the Rust port of createPolicy and withPermissions of @link-foundation/ui-links; the C# counterparts are PermissionPolicy<TLinkAddress> and PermissionsDecorator<TLinkAddress>.

A rule is a pair (g: Subject Object) marked as (r: AllowRead g) or (r: AllowWrite g): the subjects that are Subject (the subject itself, or a link of that type) may read, or read and write, the links of type Object – its values and sub-types, not the link of Object itself. Anything in either place matches every subject or every link. Types are those of Types (issue #148).

The markers are points of the data, so every address a rule holds is an address of the data. The rules live in the data itself or in a store of their own. Rules in the data are links like any other: a subject that may write them may change the rules, so give Anything writes to administrators only, or keep the rules apart.

Structs§

Forbidden
A write a subject may not make; it reads Forbidden: what.
LinksTokenTable
The tokens a links server knows, stored as links (issue #149): the authenticator of (auth: token) that clink --tokens uses.
PermissionMarkers
The three points of the data permission rules are made of: the markers AllowRead and AllowWrite of rules and Anything, which matches every subject or every link.
PermissionPolicy
Permissions stored as links; see the module documentation.
PermissionsDecorator
The store as one subject sees it; see the module documentation.

Enums§

PermissionAccess
What a rule allows.

Traits§

AccessPolicy
Who may read and write what.