View Source mix janus.gen.policy (Janus v0.3.2)

Creates a basic policy module.

$ mix janus.gen.policy [--module MODULE] [--path PATH]

Creates the following file:

  • lib/app_name/policy.ex - A Janus policy module containing additional authorization helpers (see Generated Policy Modules for more info)

options

Options

  • --module - The name of the generated module, defaults to AppName.Policy
  • --app - The name of the application namespace, defaults to your application name camelized, e.g. AppName
  • --path - The path (including filename) for the generated module, defaults to lib/app_name/policy.ex