Exception: CurrentScope::AccessDenied
- Inherits:
-
StandardError
- Object
- StandardError
- CurrentScope::AccessDenied
- Defined in:
- lib/current_scope.rb
Overview
Raised when the resolver denies an action gated by Guard (or when the management UI is accessed without a full-access role). Carries an optional machine-readable reason (:sod_veto, :no_grant, :impersonation_gate).
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(message = nil, reason: nil) ⇒ AccessDenied
constructor
A new instance of AccessDenied.
Constructor Details
#initialize(message = nil, reason: nil) ⇒ AccessDenied
Returns a new instance of AccessDenied.
21 22 23 24 |
# File 'lib/current_scope.rb', line 21 def initialize( = nil, reason: nil) super() @reason = reason end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
19 20 21 |
# File 'lib/current_scope.rb', line 19 def reason @reason end |