We’ve released Permit - a new open-source project at Curiosum aiming to make it easier to manage permission-based access control in Elixir applications, supporting Ecto, Phoenix and LiveView. Permit exposes a mostly plain-Elixir, DSL-free syntax to reduce developer confusion and avoid a steep learning curve.
Permit.Ecto, Permit is the first authorization library for Elixir to automatically convert authorization conditions to Ecto queries, as well as being the first to integrate seamlessly with Phoenix LiveView with
If you’re interested in securing your controllers and making resource loading and authorization easier, or you used to like
cancancan popular with Rails developers, you might find Permit especially useful (it is very far from being a clone of anything, though). See README for usage examples.
Permit consists of three packages:
- permit v0.1.3 — Documentation - provides the basic syntax for authorization conditions in the app’s business domain
- permit_ecto v0.1.1 — Documentation - provides the means to automatically convert authorization conditions to Ecto queries
- permit_phoenix v0.1.0 — Documentation - plugs
Permit.Ectointo Phoenix controllers and LiveView to automatically preload and authorize records and construct Ecto queries based on authorization conditions and current execution context.
- Introduction article: Authorize access to your Phoenix app with Permit | Curiosum
- Elixir Meetup presentations: https://www.youtube.com/watch?v=hvUBR_4T76E, https://www.youtube.com/watch?v=qNl3fKpzQFY
Feel free to contribute and enjoy the usage!