Skip to content

Policy

A rule: which principals may do which actions on which model, narrowed by a filter in the query grammar. Packs ship defaults, admins edit them, Shares compile into them.

PackSystem
Versionv1 (latest)
URNurn:postware:system:policy
Identityname

Fields

FieldTypeReqNotes
namestringyes
principalobjectyesthe class of caller the policy applies to; {kind: enum(role|end_user|share|public), value?: string}
applies_tostringyesa model name, or * for every model
actionsenum(read|create|update|delete)[]yes
whereobjectnoa where object of the query grammar; variables @principal.person, @principal.member, @principal.identity, @principal.affiliated_organizations, @share.id, @now; ``
fieldsstring[]nofield allow-list for read or update
enabledboolyesdefault true
originenum(pack|workspace|share)yeswho created it; default workspace