mix sekisho.install (Sekisho v0.1.0-dev)

Copy Markdown View Source

Installs Sekisho in a Phoenix application.

$ mix igniter.install sekisho

or, with Sekisho already in the deps, mix sekisho.install. Igniter shows each change as a diff before it writes, and running the task again changes nothing:

  • the migration of Sekisho's tables (mix sekisho.gen.migration), with ids of your repo's type;
  • lib/my_app/permissions.ex, your permissions module, with no policy yet: your file, written once;
  • import MyApp.Permissions, only: [allowed?: 3] in the html_helpers of your web module, for templates;
  • .formatter.exs imports Sekisho's, so policies read role :viewer, permissions: [:read].

Then write your first policy (Sekisho.Policy) and add it to policies:.