type
AccessRule
AccessRule decides whether one field value may be created, read, or updated. Return false during a write to reject the operation, or during a read to omit the field from the response. Returning an error stops the operation. Field rules cannot return the query predicates supported by collection access rules.
Full signature
type AccessRule func(operation.AccessContext) (bool, error)Related types
AccessContextAccessContext supplies surrounding values to a field's boolean access rule. Write admission uses the candidate at its authorization checkpoint; read rules inspect the current response and decide whether this field may remain visible.