Class: Sequel::Privacy::AllPowerfulVC

Inherits:
ViewerContext show all
Extended by:
T::Sig
Defined in:
lib/sequel/privacy/viewer_context.rb

Overview

All-powerful viewer context that bypasses all privacy checks. Used for admin operations, background jobs, etc. Requires a reason for audit logging.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ViewerContext

all_powerful, anonymous, for_actor, for_api_actor, omniscient

Constructor Details

#initialize(reason) ⇒ AllPowerfulVC

Returns a new instance of AllPowerfulVC.



73
74
75
76
# File 'lib/sequel/privacy/viewer_context.rb', line 73

def initialize(reason)
  @reason = T.let(reason, Symbol)
  super()
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



79
80
81
# File 'lib/sequel/privacy/viewer_context.rb', line 79

def reason
  @reason
end