API Reference AshGrant v#0.17.0

Copy Markdown View Source

Modules

Permission-based authorization extension for Ash Framework.

Compile-time analysis of which scopes reference which ^arg(...) templates.

Ash calculation that produces per-record boolean values for UI visibility.

Runtime change that lazily populates an action argument from the record's own relationships.

SimpleCheck for write and generic actions.

Domain-level extension for AshGrant.

DSL definition for the AshGrant domain-level extension.

Introspection helpers for AshGrant domain-level DSL configuration.

DSL definition for AshGrant extension.

Represents a can_perform entity in the AshGrant DSL.

Represents a field group definition in the AshGrant DSL.

Represents a resolve_argument declaration in the AshGrant DSL.

Represents a scope definition in the AshGrant DSL.

Represents a scope_through entity in the AshGrant DSL.

Permission evaluation with deny-wins semantics.

Provides detailed explanations of authorization decisions.

Represents a detailed explanation of an authorization decision.

Converts Ash.Expr terms and scope filter values into human-readable, LLM-friendly strings.

SimpleCheck for field-level authorization within Ash's field_policies.

Per-record field-group visibility check (issue #117 phase ②).

FilterCheck for read actions.

Introspection helpers for AshGrant DSL configuration.

Permission introspection helpers for various use cases.

Permission struct with parsing and matching capabilities.

Permission input struct with optional metadata for debugging and explain functionality.

Behaviour for resolving permissions from an actor.

Validates resolved actor permissions and signals invalid combinations.

Raised in :strict mode when an actor's permissions contain a deny rule that carries a field_group — an invalid combination. See AshGrant.PermissionValidation.

Protocol for converting values to AshGrant.PermissionInput structs.

Exports policy configuration to various documentation formats.

Generates Markdown documentation for policy configuration.

Generates Mermaid flowchart diagrams for policy visualization.

DSL-based policy configuration testing for AshGrant.

Error raised when a policy test assertion fails.

Assertion macros for policy tests.

DSL macros for defining policy tests.

Generates Elixir DSL code from YAML policy test files.

Represents the result of a single policy test execution.

Executes policy tests and collects results.

Exports policy test modules to YAML format.

Parses YAML policy test files and runs them.

Ash Resource Preparation that applies field masking to read results.

Behaviour for resolving scopes to filter expressions.

Spark DSL transformer that wires up resolve_argument declarations.

Spark DSL transformer that generates CanPerform calculations from DSL entities.

Spark DSL transformer that auto-generates policies when default_policies is enabled.

Auto-generates Ash field_policies from field_group definitions.

Adds the masking preparation to resources that have field groups with masking.

Spark DSL transformer that merges domain-level AshGrant configuration into resources.

Resolves :all and deprecated [:*] wildcard in field group fields to concrete attribute names.

Validates field group definitions at compile time.

Spark DSL transformer that validates a resolver is present after domain merge.

Spark DSL transformer that validates scope_through entities at compile time.

Spark DSL transformer that validates scope definitions at compile time.

Mix Tasks

Explains an AshGrant access decision from the command line.

Exports policy configuration to various formats.

Imports YAML policy tests and generates Elixir DSL code.

Runs policy configuration tests.