class Shamu::Security::AccessDeniedError

The requested action was not permitted on the resource.

Attributes

action[R]

@return [Symbol] the requested action that was denied.

additional_context[R]

@return [Object] additional principal provided to the policy authorization

method.
principal[R]

@return [Principal] the security {Principal} in use at the time of the

policy violation.
resource[R]

@return [Object] the resource the {#action} was to be performed on.

Public Class Methods

new( message = :access_denied, action: nil, resource: nil, principal: nil, additional_context: nil ) click to toggle source

@!endgroup Attributes

Calls superclass method
# File lib/shamu/security/error.rb, line 40
def initialize( message = :access_denied, action: nil, resource: nil, principal: nil, additional_context: nil )
  @action             = action
  @resource           = resource
  @principal          = principal
  @additional_context = additional_context

  super translate( :access_denied, action: action, resource: resource )
end