Plug-based authorisation for Elixir and Phoenix
Note: this post was originally published on the Subvisual blog.
Some years ago, most of us here at Subvisual got really-perhaps-a-bit-too-much into Elixir. Ever since then, whenever we are free to choose the technology to work with, we’ve pretty much been going Elixir all the way.
We learned a lot. We laughed a lot. And I copy and pasted some code from different projects a lot. Don’t tell the rest of the development team. Aaaaanyway, I finally got around to open sourcing the copy/pasted code and releasing it as a package.
I called this thingy Dictator. It implements a plug-based authorisation system and allows you dictate (get it??) what your users can access, by defining policies (hah! get it??). You can be as granular as you want and override pretty much everything. The philosophy behind it is to implement sane defaults but be easily overridable as well. You might even call it ...