Repository navigation
Conversation
wu-clan
commented
Mar 19, 2026
# Conflicts: # backend/app/admin/crud/crud_user.py # backend/app/admin/service/auth_service.py # backend/cli.py # backend/common/dataclasses.py # backend/common/security/jwt.py # backend/common/security/rbac.py # backend/middleware/access_middleware.py # backend/plugin/core.py # backend/utils/dynamic_config.py # backend/utils/dynamic_import.py
# Conflicts: # uv.lock
# Conflicts: # .pre-commit-config.yaml # pyproject.toml # requirements.txt # uv.lock
# Conflicts: # backend/app/admin/service/auth_service.py # backend/common/security/jwt.py # backend/core/registrar.py # backend/middleware/access_middleware.py # backend/plugin/oauth2/api/v1/github.py # backend/plugin/oauth2/api/v1/google.py # backend/plugin/oauth2/crud/crud_user_social.py # backend/plugin/oauth2/service/user_social_service.py # backend/utils/dynamic_config.py
# Conflicts: # backend/app/admin/service/auth_service.py # backend/plugin/core.py
# Conflicts: # backend/common/context.py
fba 2.0.0 已移除 MySQL 支持,租户脚本只需保留 PostgreSQL 版本
多租户改为可选能力,默认关闭,未安装 tenant 插件时不再影响主框架 租户相关的写入、模型与能力注册收敛到 backend/common/tenant.py, 主框架不再直接依赖租户插件,租户状态校验改由插件 setup hook 注册
操作日志队列不再复制整份请求上下文,只保留租户 ID, 消费时按租户建立作用域,租户 ID 交由租户监听器注入
租户是独立插件,配置项按插件分组归入 backend/core/conf.py 的插件配置段
租户插件是本地安装的第三方插件,不应作为子模块记录在仓库中
访问中间件不再预先写入默认租户,租户 ID 的读取统一走 common/tenant.py 的 current_tenant_id(),缺失时回落到默认租户
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
【实验性】完整租户支持需安装租户插件
此分支暂时不会合并到主分支,而是仅通过 tenant 分支提供(同步更新主分支)
相关文档:多租户
相关问题请直接在此 PR 下方评论
close #821
close #1089