URL-driven active organization loader (Phase 16 D-03, D-04, D-13).
Reads conn.params[scope_param] (default "org"), resolves the
organization by slug, verifies membership, follows 7-day slug aliases,
and refreshes the session pointer when the URL org differs from the
session pointer — delegating the write to
Sigra.Plug.PutActiveOrganization.call/3 (Phase 14 D-16 single-writer).
Returns 404 via the configured error_handler for unknown slugs AND
for known slugs the current user is not a member of (enumeration
prevention, D-04). Both paths go through the same :not_found
disposition so callers cannot distinguish them by response shape or
timing.
Options
:error_handler— required. Module implementingSigra.Plug.ErrorHandler. Used for the:not_foundhalt path.:organizations— required. The host'suse Sigra.Organizationsmodule exposing__sigra_org_config__/0.:session_store— required. Module implementingSigra.SessionStore. Forwarded toSigra.Plug.PutActiveOrganization.call/3when the URL org differs from the session pointer.:scope_module— required. Host scope module forput_active_organization/3.:scope_param— optional. URL param name holding the slug. Default:"org".:session_store_opts— optional. Forwarded to the session store.