Exception: Authz::Controllers::AuthorizationManager::AuthorizationNotPerformedError

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

Overview

Error that will be raised if a controller action has not called the ‘authorize` or `skip_authorization` methods.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ AuthorizationNotPerformedError

Returns a new instance of AuthorizationNotPerformedError.



17
18
19
20
21
22
# File 'lib/authz/controllers/authorization_manager.rb', line 17

def initialize(options = {})
  @controller = options.fetch :controller
  @action = options.fetch :action
  msg = "#{controller}##{action} is missing authorization."
  super(msg)
end

Instance Attribute Details

#actionObject (readonly)



16
17
18
# File 'lib/authz/controllers/authorization_manager.rb', line 16

def action
  @action
end

#controllerObject (readonly)



16
17
18
# File 'lib/authz/controllers/authorization_manager.rb', line 16

def controller
  @controller
end