# `AshGrant.Domain.Dsl`
[🔗](https://github.com/jhlee111/ash_grant/blob/v0.22.0/lib/ash_grant/domain/dsl.ex#L1)

DSL definition for the AshGrant domain-level extension.

This module defines the `ash_grant` DSL section that can be added to
Ash domains to configure shared permission settings inherited by resources.

Only `resolver` and `scope` entities are supported at the domain level.
Resource-specific options like `resource_name`, `default_policies`, and
`field_group` must be configured on each resource.

## Example

    defmodule MyApp.Blog do
      use Ash.Domain,
        extensions: [AshGrant.Domain]

      ash_grant do
        resolver MyApp.PermissionResolver

        scope :always, true
        scope :own, expr(author_id == ^actor(:id))
      end

      resources do
        resource MyApp.Blog.Post   # inherits resolver + scopes
        resource MyApp.Blog.Comment # inherits resolver + scopes
      end
    end

# `sections`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
