Exception: Authz::Controllers::AuthorizationManager::MissingScopingInstance

Inherits:
StandardError
  • Object
show all
Defined in:
lib/authz/controllers/authorization_manager.rb

Overview

Error that will be raised if the authorized method is not provided a scoping instance and the skip_scoping option is not used

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ MissingScopingInstance

Returns a new instance of MissingScopingInstance.



30
31
32
33
34
35
36
# File 'lib/authz/controllers/authorization_manager.rb', line 30

def initialize(options = {})
  @controller = options.fetch :controller
  @action = options.fetch :action
  msg = "#{controller}##{action}. Provide an instance to " \
        'perform authorization or use the skip_scoping option'
  super(msg)
end

Instance Attribute Details

#actionObject (readonly)



29
30
31
# File 'lib/authz/controllers/authorization_manager.rb', line 29

def action
  @action
end

#controllerObject (readonly)



29
30
31
# File 'lib/authz/controllers/authorization_manager.rb', line 29

def controller
  @controller
end