Exception: ActiveAdmin::AccessDenied
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveAdmin::AccessDenied
- Defined in:
- lib/active_admin/base_controller/authorization.rb
Overview
Exception class to raise when there is an authorized access exception thrown. The exception has a few goodies that may be useful for capturing / recognizing security issues.
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(user, action, subject) ⇒ AccessDenied
constructor
A new instance of AccessDenied.
- #message ⇒ Object
Constructor Details
#initialize(user, action, subject) ⇒ AccessDenied
Returns a new instance of AccessDenied.
9 10 11 12 13 |
# File 'lib/active_admin/base_controller/authorization.rb', line 9 def initialize(user, action, subject) @user, @action, @subject = user, action, subject super() end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
7 8 9 |
# File 'lib/active_admin/base_controller/authorization.rb', line 7 def action @action end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
7 8 9 |
# File 'lib/active_admin/base_controller/authorization.rb', line 7 def subject @subject end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
7 8 9 |
# File 'lib/active_admin/base_controller/authorization.rb', line 7 def user @user end |
Instance Method Details
#message ⇒ Object
15 16 17 |
# File 'lib/active_admin/base_controller/authorization.rb', line 15 def I18n.t("active_admin.access_denied.message") end |