Exception: Devise::Auth0::AccessDenied

Inherits:
Error
  • Object
show all
Defined in:
lib/devise/auth0/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, action = nil, resource_class = nil) ⇒ AccessDenied

Returns a new instance of AccessDenied.



11
12
13
14
15
16
17
18
19
20
# File 'lib/devise/auth0/exceptions.rb', line 11

def initialize(message = nil, action = nil, resource_class = nil)
  @message = message.presence || I18n.t(
    :"unauthorized.default",
    default: "You are not authorized to access this page.",
  )
  @action = action
  @resource_class = resource_class

  super(@message)
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



9
10
11
# File 'lib/devise/auth0/exceptions.rb', line 9

def action
  @action
end

#subjectObject (readonly)

Returns the value of attribute subject.



9
10
11
# File 'lib/devise/auth0/exceptions.rb', line 9

def subject
  @subject
end