mix ash_authzed.install (ash_authzed v0.2.0)

Copy Markdown View Source

Installs and configures AshAuthzed in an Ash project.

Options

  • --adapter or -a — Authorization backend to configure (licet or spicedb). Defaults to licet.
  • --repo or -r — The Ecto repo for Licet to use. Defaults to <MyApp>.Repo.
  • --schema-path — Path to the .zed or .yaml schema bundle. Defaults to "priv/licet/user_permissions.yaml".

Example

mix igniter.install ash_authzed --adapter licet

Summary

Functions

Patches an existing Ash Resource module to use Ash.Policy.Authorizer and AshAuthzed, and appends a starter authzed do ... end block.

Functions

add_authzed_to_resource(igniter, resource_module, object_type)

@spec add_authzed_to_resource(Igniter.t(), module(), String.t()) :: Igniter.t()

Patches an existing Ash Resource module to use Ash.Policy.Authorizer and AshAuthzed, and appends a starter authzed do ... end block.