Exception: Spud::AccessDeniedError

Inherits:
RequestError show all
Defined in:
lib/spud_core/errors.rb

Instance Attribute Summary

Attributes inherited from RequestError

#code, #item, #request_url, #template, #title

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ AccessDeniedError

Returns a new instance of AccessDeniedError.



12
13
14
15
16
17
18
19
# File 'lib/spud_core/errors.rb', line 12

def initialize(opts={})
  @item = opts[:item] || 'page'
  @template = opts[:template]
  @code = 403
  @title = "Access Denied"
  message = opts[:message] || "You are not authorized to view the requested #{item.downcase}."
  super(message)
end