Class: Terret::Tools::AllowListFloor
- Inherits:
-
Hames::Service
- Object
- Hames::Service
- Terret::Tools::AllowListFloor
- Defined in:
- lib/terret/tools.rb
Overview
AllowList as a config row, so a bundle can ship the deny-by-default floor the way it ships everything else (docs/composition.md §6). The module above is still the mechanism and still installable by hand; this is only the mounting. Its registrations are already effects of the mounting row, so unloading the row takes the gate with it.
patterns: is the floor — the policy governing sessions that never
issued a policy/updated of their own. Unconfigured means an empty floor,
which denies every tool call.
Instance Method Summary collapse
-
#reconfigure(config) ⇒ Object
Hot-reconfigure the floor.
- #start(ctx) ⇒ Object
Instance Method Details
#reconfigure(config) ⇒ Object
Hot-reconfigure the floor. The base Service#reconfigure only warns, so a config/updated that TIGHTENS the floor (drops a pattern) would silently keep the looser patterns start captured — the deny-by-default policy left looser than the operator asked for. Tear the old gate and its invalidation down and re-install with the new patterns; this runs under with_owner(id), so the new registrations are owned by this row exactly as start's were, and take effect on the next call.
321 322 323 324 |
# File 'lib/terret/tools.rb', line 321 def reconfigure(config) @disposer&.call @disposer = AllowList.install_floor(@ctx, config[:patterns] || []) end |
#start(ctx) ⇒ Object
309 310 311 312 |
# File 'lib/terret/tools.rb', line 309 def start(ctx) @ctx = ctx @disposer = AllowList.install_floor(ctx, config[:patterns] || []) end |