Class BowireUserContext
- Namespace
- Kuestenlogik.Bowire.Auth
- Assembly
- Kuestenlogik.Bowire.dll
Static facade the per-user stores call through to resolve paths.
Defaults to Instance; the host
can swap in a request-aware implementation by setting
Current at startup (single-user override) or via an
async-local HttpContext-driven middleware (multi-tenant mode,
once SCIM lands).
public static class BowireUserContext
- Inheritance
-
BowireUserContext
- Inherited Members
Properties
Current
Active resolver. Defaults to single-user
Instance; the host can
replace at startup. Multi-tenant deployments will route through
an AsyncLocal<IBowireUserStore>-backed wrapper so
each request sees its caller's scope -- that machinery lands
with the SCIM phase, not now.
public static IBowireUserStore Current { get; set; }
Property Value
Methods
GetUserPath(string)
Convenience: resolve filename under the
active user store. Equivalent to Current.GetUserPath(filename).
Stores call this to keep their existing static shape while
participating in the user-scoping seam.
public static string GetUserPath(string filename)
Parameters
filenamestring
Returns
GetWorkspacePath(string, string?, string)
#147 — resolve a per-workspace path. When storageRoot
is set (git-backed workspace, the operator points the workspace
at a checked-out folder), the resolver returns
<storageRoot>/<relativePath>. Otherwise falls
back to the legacy per-user layout under
~/.bowire/workspaces/<workspaceId>/<relativePath>.
Stores call this to participate in the git-workspace seam
without having to thread storageRoot through every method.
public static string GetWorkspacePath(string workspaceId, string? storageRoot, string relativePath)
Parameters
workspaceIdstringWorkspace identifier. Used as a path segment in the default- folder fallback path; ignored when
storageRootis set.storageRootstringOptional absolute path to a git-backed workspace's root.
relativePathstringPath relative to the workspace root — e.g. "environments/staging.json", "recordings/login.json".