Sha256: 032b54fac442af11e6b9f2b60e6fa5b2dbbd63fd2470641e93b4d0f2443b3b40

Contents?: true

Size: 1.87 KB

Versions: 12

Compression:

Stored size: 1.87 KB

Contents

Authority.configure do |config|

  # USER_METHOD
  # ===========
  # Authority needs the name of a method, available in any controller, which
  # will return the currently logged-in user. (If this varies by controller,
  # just create a common alias.)
  #
  # Default is:
  #
  # config.user_method = :current_user

  # CONTROLLER_ACTION_MAP
  # =====================
  # For a given controller method, what verb must a user be able to do?
  # For example, a user can access 'show' if they 'can_read' the resource.
  #
  # These can be modified on a per-controller basis; see README. This option
  # applies to all controllers.
  #
  # Defaults are as follows:
  #
  # config.controller_action_map = {
  #   :index   => 'read',
  #   :show    => 'read',
  #   :new     => 'create',
  #   :create  => 'create',
  #   :edit    => 'update',
  #   :update  => 'update',
  #   :destroy => 'delete'
  # }

  # ABILITIES
  # =========
  # Teach Authority how to understand the verbs and adjectives in your system. Perhaps you
  # need {:microwave => 'microwavable'}. I'm not saying you do, of course. Stop looking at
  # me like that.
  #
  # Defaults are as follows:
  #
  # config.abilities =  {
  #   :create => 'creatable',
  #   :read   => 'readable',
  #   :update => 'updatable',
  #   :delete => 'deletable'
  # }

  # LOGGER
  # ======
  # If a user tries to perform an unauthorized action, where should we log that fact?
  # Provide a logger object which responds to `.warn(message)`, unless your
  # security_violation_handler calls a different method.
  #
  # Default is:
  #
  # config.logger = Logger.new(STDERR)
  #
  # Some possible settings:
  # config.logger = Rails.logger                     # Log with all your app's other messages
  # config.logger = Logger.new('log/authority.log')  # Use this file
  # config.logger = Logger.new('/dev/null')          # Don't log at all (on a Unix system)

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
authority-3.3.0 lib/generators/templates/authority_initializer.rb
authority-3.2.2 lib/generators/templates/authority_initializer.rb
authority-3.2.1 lib/generators/templates/authority_initializer.rb
authority-3.2.0 lib/generators/templates/authority_initializer.rb
authority-3.1.0 lib/generators/templates/authority_initializer.rb
authority-3.0.0 lib/generators/templates/authority_initializer.rb
authority-2.10.0 lib/generators/templates/authority_initializer.rb
authority-2.9.0 lib/generators/templates/authority_initializer.rb
authority-2.8.1 lib/generators/templates/authority_initializer.rb
authority-2.8.0 lib/generators/templates/authority_initializer.rb
authority-2.7.0 lib/generators/templates/authority_initializer.rb
authority-2.6.0 lib/generators/templates/authority_initializer.rb