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.



88
89
90
91
# File 'lib/sequel/privacy/viewer_context.rb', line 88

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

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



94
95
96
# File 'lib/sequel/privacy/viewer_context.rb', line 94

def reason
  @reason
end