36 lines
970 B
Python
36 lines
970 B
Python
"""
|
|
app/tenancy/__init__.py
|
|
-----------------------
|
|
Public exports for the tenancy package.
|
|
|
|
MT-1: RoutingSession, init_tenancy, TenantContext
|
|
MT-5: feature_required, quota_soft_check, check_quota, check_feature
|
|
"""
|
|
|
|
from app.tenancy.routing import RoutingSession
|
|
from app.tenancy.middleware import init_tenancy
|
|
from app.tenancy.context import TenantContext
|
|
from app.tenancy.gates import feature_required, quota_soft_check
|
|
from app.tenancy.quota import check_quota, check_feature
|
|
from app.tenancy.session_binding import (
|
|
bind_session_tenant, enforce_session_tenant, current_tenant_id,
|
|
tag_user_id, parse_user_id, SESSION_TENANT_KEY,
|
|
)
|
|
|
|
__all__ = [
|
|
'RoutingSession',
|
|
'init_tenancy',
|
|
'TenantContext',
|
|
'feature_required',
|
|
'quota_soft_check',
|
|
'check_quota',
|
|
'check_feature',
|
|
# MT-21
|
|
'bind_session_tenant',
|
|
'enforce_session_tenant',
|
|
'current_tenant_id',
|
|
'tag_user_id',
|
|
'parse_user_id',
|
|
'SESSION_TENANT_KEY',
|
|
]
|