Class: Hecks::Runtime::Caller::Current
- Inherits:
-
Struct
- Object
- Struct
- Hecks::Runtime::Caller::Current
- Defined in:
- lib/hecks/runtime/caller.rb
Overview
actor_id is OPTIONAL, on top of the role that has always been
here — a caller that states only a role (every caller before this)
is checked the way it always was, string equality against the
command's own role. A caller that also names WHO it is lets
CommandRules::Authorization check a real Governance
RoleAssignment instead, once the command's domain has Governance
attached — see that module's own header for the full split.
as_of and scope are BOTH optional too, and both self-asserted
by the caller rather than derived from the command — deliberately:
as_of is filled at the door from Ports::Clock.now, never
inside the interpreter (see Ports::Clock's own header), so
there is no other place to source it from. scope stays here
rather than becoming a command-level DSL construct on purpose —
a scope check that lived in the bluebook would put an
authorization concern inside the domain declaration itself; this
keeps it an application-boundary fact instead, the same shape
role/actor_id already are. The tradeoff: a caller states what
scope it is acting in, and holds_role? verifies a live grant
exists for THAT scope — it does not independently confirm the
scope matches whatever the command's own target data belongs to.
Instance Attribute Summary collapse
-
#actor_id ⇒ Object
Returns the value of attribute actor_id.
-
#as_of ⇒ Object
Returns the value of attribute as_of.
-
#role ⇒ Object
Returns the value of attribute role.
-
#scope ⇒ Object
Returns the value of attribute scope.
Instance Attribute Details
#actor_id ⇒ Object
Returns the value of attribute actor_id
36 37 38 |
# File 'lib/hecks/runtime/caller.rb', line 36 def actor_id @actor_id end |
#as_of ⇒ Object
Returns the value of attribute as_of
36 37 38 |
# File 'lib/hecks/runtime/caller.rb', line 36 def as_of @as_of end |
#role ⇒ Object
Returns the value of attribute role
36 37 38 |
# File 'lib/hecks/runtime/caller.rb', line 36 def role @role end |
#scope ⇒ Object
Returns the value of attribute scope
36 37 38 |
# File 'lib/hecks/runtime/caller.rb', line 36 def scope @scope end |