Exception: CurrentScope::AccessDenied

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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(message = nil, reason: nil)
  super(message)
  @reason = reason
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



19
20
21
# File 'lib/current_scope.rb', line 19

def reason
  @reason
end