Exception: Spud::AccessDeniedError
- Inherits:
-
RequestError
- Object
- StandardError
- RequestError
- Spud::AccessDeniedError
- Defined in:
- lib/spud_core/errors.rb
Instance Attribute Summary
Attributes inherited from RequestError
#code, #item, #request_url, #template, #title
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ AccessDeniedError
constructor
A new instance of AccessDeniedError.
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" = opts[:message] || "You are not authorized to view the requested #{item.downcase}." super() end |