AshGrant.Dsl.FieldGroup (AshGrant v0.14.1)

Copy Markdown View Source

Represents a field group definition in the AshGrant DSL.

Field groups define named sets of fields for column-level read authorization. They allow fine-grained control over which fields an actor can see, with support for inheritance, masking, and hierarchical field visibility.

Fields

  • :name - The atom name of the field group (e.g., :public, :sensitive)
  • :fields - :all or list of field atoms included in this group (resolved to [atom()] by transformer)
  • :inherits - Optional list of parent field group names to inherit fields from
  • :except - Optional list of fields to exclude when fields is :all
  • :mask - Optional list of fields to mask (return masked values instead of hiding)
  • :mask_with - Optional 2-arity function (value, field_name) -> masked_value
  • :description - Optional human-readable description

Summary

Types

t()

@type t() :: %AshGrant.Dsl.FieldGroup{
  __spark_metadata__: map() | nil,
  description: String.t() | nil,
  except: [atom()] | nil,
  fields: :all | [atom()],
  inherits: [atom()] | nil,
  mask: [atom()] | nil,
  mask_with: (any(), atom() -> any()) | nil,
  name: atom()
}