Class: Sequel::Privacy::OmniscientVC

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

Overview

Omniscient viewer context that can see everything but cannot mutate. Used for system operations like authentication lookups.

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) ⇒ OmniscientVC

Returns a new instance of OmniscientVC.



85
86
87
88
# File 'lib/sequel/privacy/viewer_context.rb', line 85

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

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



91
92
93
# File 'lib/sequel/privacy/viewer_context.rb', line 91

def reason
  @reason
end