GreenAsh.Tenant (GreenAsh v0.3.0)

Copy Markdown View Source

The console's current tenant: the value threaded through every Ash call so that multitenant resources can be browsed.

A tenant is application knowledge — Ash can say a resource needs one, never which one you mean — so it is asked for rather than inferred. Kept in the HTTP session beside the actor, and for the same reason: a LiveView cannot write the session through its socket (see GreenAsh.SessionController).

There is no validation of the value. Ash accepts any term as a tenant, and a console whose job is to probe your resources has no business deciding which tenants are real.

Summary

Functions

The tenant stored in the session, or nil.

Short label for the header (e.g. "tenant:acme"), or nil when unset.

Functions

from_session(arg1)

The tenant stored in the session, or nil.

label(tenant)

Short label for the header (e.g. "tenant:acme"), or nil when unset.

session_key()