feat(tenant): 成员管理新增 CASDOOR 同步与批量导入部门匹配(000156)
deploy-hxtesting / build-and-deploy (push) Failing after 1s
deploy-hxtesting / build-and-deploy (push) Failing after 1s
同步CASDOOR成员: - 经 Casdoor 管理 API 拉全量用户目录:部门落组织架构(org_depts),账号 工号优先匹配/邮箱兜底,未注册自动开户并加入空间;单向增量幂等, 无部门数据自动降级为纯成员同步 - 新增 OIDC_AUTH_ADMIN_* 配置段(client_credentials/服务账号密码两种模式、 部门字段映射),集成层见 internal/integrations/casdoor 用户部门字段(迁移 000156): - users.dept_code/dept_name 同步态字段:成员列表「所属部门」列展示, 组织中心从平台用户添加时按部门自动预选 批量导入部门列: - 模板调整为 工号/姓名/部门/邮箱/角色 五列,六语言弹窗文案同步更新 - 部门列按部门管理自动匹配:名称/编号精确命中 → 唯一子串兜底,多候选 歧义不匹配;命中回写所属部门,未命中留空不阻断该行导入;部门管理 不可用时整列降级忽略(与 Casdoor 同步降级同思路) 构建: - Dockerfile: browserskill 预构建产物快速通道,rustup 按需安装 + BuildKit 缓存挂载
This commit is contained in:
1 parent
27c4d96ae1
commit
168057db78
32 files changed
+2408
-49
No files matched your search
@@ -126,7 +126,9 @@ func (s *stubMemberUserService) GetUsersByIDs(ctx context.Context, ids []string)
|
||||
// middleware via memberTestRouter rather than threading a cfg through
|
||||
// the handler.
|
||||
func newTestMemberHandler(ms interfaces.TenantMemberService, us interfaces.UserService) *TenantMemberHandler {
|
||||
return NewTenantMemberHandler(ms, us, nil)
|
||||
// 组织中心/同步服务传 nil:CRUD 测试不触达部门匹配与 sync-casdoor
|
||||
// 路由(handler 内均有 nil 兜底)。
|
||||
return NewTenantMemberHandler(ms, us, nil, nil, nil)
|
||||
}
|
||||
|
||||
// memberTestRouter wires the handler with the same errorCapture middleware
|
||||
@@ -685,7 +687,7 @@ func TestTenantMember_SuperuserBypassRequiresFeatureFlag(t *testing.T) {
|
||||
// Build the router with the flag explicitly off — the carve-out
|
||||
// now lives in middleware.RequirePathTenantMatch, which the router
|
||||
// helper mounts.
|
||||
h := NewTenantMemberHandler(ms, &stubMemberUserService{}, nil)
|
||||
h := NewTenantMemberHandler(ms, &stubMemberUserService{}, nil, nil, nil)
|
||||
router := memberTestRouterWithCfg(h, &config.Config{
|
||||
Tenant: &config.TenantConfig{EnableCrossTenantAccess: false},
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user