type

GlobalAccess

Access rules for reading, updating, publishing, and unpublishing a global.

Properties

PropertyTypeDescription
ReadAccessRuleControl reads of the singleton.
ReadVersionsAccessRuleControl version-history reads; defaults to Read.
ReadDraftsAccessRuleReadDrafts controls whether an actor sees the draft of a versioned global. It accepts only Allow or Deny and, when omitted, allows only editors, as CollectionAccess.ReadDrafts describes.
UpdateAccessRuleControl singleton updates.
PublishAccessRuleControl publishing and atomic published edits; defaults to Update.
UnpublishAccessRuleControl moving a published singleton to draft; defaults to Update.

Full signature

type GlobalAccess struct { // Read controls global reads and may return a Where decision. Read AccessRule // ReadVersions controls version-history reads and may return a Where decision. // When omitted, Read is used. ReadVersions AccessRule // ReadDrafts controls whether an actor sees the draft of a versioned global. // It accepts only Allow or Deny and, when omitted, allows only editors, as // CollectionAccess.ReadDrafts describes. ReadDrafts AccessRule // Update controls global updates and may return a Where decision for an // existing singleton. Update AccessRule // Publish controls publishing and atomic published-global edits. When // omitted, Update is used. Publish AccessRule // Unpublish controls moving a published global back to draft. When omitted, // Update is used. Unpublish AccessRule }

Source core/access.go:139