Skip to main content

single_tenant_tr_plugin/
lib.rs

1//! Single-Tenant Resolver Plugin
2//!
3//! Zero-configuration plugin for single-tenant deployments.
4//! Implements flat (single-tenant) semantics where only the security context's tenant exists.
5//!
6//! ## Behavior
7//!
8//! - `get_tenant`: Returns tenant info (name: "Default") only if ID matches security context
9//! - `get_tenants`: Returns tenant info only for IDs matching the security context
10//! - `get_ancestors`: Returns empty ancestors (tenant is root, no parent)
11//! - `get_descendants`: Returns empty list (no children in flat model)
12//! - `is_ancestor`: Returns `false` for self-check; errors for any other IDs (only one tenant exists)
13//!
14//! ## Configuration
15//!
16//! No configuration required. The plugin registers itself automatically with:
17//! - Vendor: `hyperspot`
18//! - Priority: `1000` (lower than static plugin, so static wins when both are enabled)
19
20#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
21
22pub mod domain;
23pub mod module;
24
25pub use module::SingleTenantTrPlugin;