feat(tenant): 成员管理新增 CASDOOR 同步与批量导入部门匹配(000156)
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:
runny committed 2026-11-21 01:39:06 +08:00
1 parent 27c4d96ae1
commit 168057db78
32 files changed
+2408 -49

No files matched your search

+21 -2
View File
@@ -8517,6 +8517,7 @@ export default {
},
columns: {
member: 'Employee ID & email',
deptName: 'Department',
displayName: 'Name',
role: 'Role',
joinedAt: 'Joined',
@@ -8539,10 +8540,10 @@ export default {
button: 'Bulk Import',
dialogTitle: 'Bulk Import Members',
resultTitle: 'Import Result',
description: 'Add members in bulk from an Excel roster: download the template, fill in employee ID, email, name and role, then upload it back. Members without an existing account are provisioned automatically and join this workspace right away.',
description: 'Add members in bulk from an Excel roster: download the template, fill in employee ID, name, department, email and role, then upload it back. Members without an existing account are provisioned automatically and join this workspace right away. Departments are auto-matched against the departments maintained in Department Management; unmatched values are left blank.',
downloadTemplate: 'Download Template',
pickFile: 'Click to choose an Excel file',
fileHint: 'Supports .xlsx / .xls; headers: employee ID, email, name, role',
fileHint: 'Supports .xlsx / .xls; headers: employee ID, name, department, email, role',
repick: 'Click to choose a different file',
submit: 'Start Import',
invalidFileType: 'Please choose an .xlsx or .xls Excel file',
@@ -8554,6 +8555,24 @@ export default {
rowLabel: 'Row {row}',
reimport: 'Import again'
},
syncCasdoor: {
button: 'Sync CASDOOR members',
dialogTitle: 'Sync CASDOOR members',
resultTitle: 'Sync result',
description: 'Pull registered users from CASDOOR automatically: new users get an account and join this workspace as viewers; existing members keep their roles. Department codes/names are synced into the org structure. Nothing is deleted or disabled.',
confirm: 'Start sync',
failed: 'Sync failed',
summaryTotal: 'CASDOOR users',
summaryCreated: 'New accounts',
summaryAdded: 'Newly joined',
summaryExists: 'Already members',
summaryDepts: 'New departments',
skippedListTitle: 'Skipped',
skippedEmpty: 'All users processed, nothing skipped.',
deptSourceHint: 'Department source field: {field}',
noDeptHint: 'CASDOOR users have no department data yet; only members were synced. Sync again after department fields are enabled.',
done: 'Sync finished'
},
remove: {
button: 'Remove',
confirmBody: 'Are you sure you want to remove {name} from this workspace? They will lose access immediately.',