traveltechdeluxe / ash-rbac

Ash extension that allows for easier application of policies.
https://hexdocs.pm/ash_rbac/AshRbac.html
MIT License
13 stars 5 forks source link
ash ash-rbac elixir rbac

AshRbac

A small extension that allows for easier application of policies

rbac do
  role :user do
    fields [:fields, :user, :can, :see]
    actions [:actions, :user, :can :use]
  end
end

Installation

The package can be installed by adding ash_rbac to your list of dependencies in mix.exs:

def deps do
  [
    {:ash_rbac, "~> 0.6.0"},
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ash_rbac.