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).
Referring to a link is a right of its own (issue #161). Without it an
address the subject may not read answers Link not found, exactly as a
missing one. A subject may refer to an address when it may read the link
there, when it is that link, when a rule (r: AllowReference (g: Subject Object)) covers it (Object itself and the links of type Object), or
when it is the Object of an AllowRead or AllowWrite rule of the
subject, so User writes Note is enough to type a link as Note.
AllowReference does not allow reading. A rule from Anything to
Anything lets every subject refer to every link.
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. - Links
Token Table - The tokens a links server knows, stored as links (issue #149): the
authenticator of
(auth: token)thatclink --tokensuses. - Permission
Markers - The four points of the data permission rules are made of: the markers
AllowRead,AllowWriteandAllowReferenceof rules andAnything, which matches every subject or every link. - Permission
Policy - Permissions stored as links; see the module documentation.
- Permissions
Decorator - The store as one subject sees it; see the module documentation.
Enums§
- Permission
Access - What a rule allows.
Traits§
- Access
Policy - Who may read, write and refer to what.