feat(admin): identity & members subsystem (incl. user merge)

未关闭
#1,957 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
28/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
html, sql

调研方向

Start with the required spec under docs/superpowers/specs/ and the existing 0011_user_merging.sql migration. Map every foreign key to users.id, then define the admin member views, reversible merge flow, role policy, and before/after audit requirements. Done means the full UI and business logic are specified and implemented with safe per-pair confirmation.

由索引模型根据 Issue 内容生成。

描述

Summary

Member management surface inside the admin app: list / search, detailed view, manual edits, role assignment, and the user-merge tool that resolves cross-email duplicates (currently 84 candidate groups in the DB).

Requirements

  • Brainstorming → spec under docs/superpowers/specs/.
  • /admin/members — paginated, searchable directory with filters (role, deletedAt, mergedIntoUserId, hasProfile, etc.).
  • /admin/members/:id — detail view with editable identity fields, role assignment (super_admin only), affiliations, soft-delete control, audit history inline.
  • User merge flow: candidate list, side-by-side comparison, action sets users.merged_into_user_id and repoints related rows to canonical (user_organizations, experiences, education, certifications, etc.).
  • Reversal path: a super_admin can clear merged_into_user_id on a tombstone row; repoint logic must stay reversible.
  • Heuristics-assist for the duplicate review queue (same name, similar timestamp, overlapping affiliation, identical ORCID).
  • All mutations write before/after audit captures — this is the highest-stakes admin action and the audit trail must be reversible-by-evidence.

Context

Foundation must ship first (#1956). Existing schema: users.merged_into_user_id column + indexes already landed in 0011_user_merging.sql; this issue is the UI + business logic on top.

Implementation Notes

  • Policy: canMergeUsers is super_admin only.
  • Repoint tables: enumerate every FK to users.id and decide per table whether to repoint or null out on merge.
  • The 84 candidate groups will need iteration through — bulk-merge is risky; prefer a queue UI with one-click confirm per pair.
主要语言
HTML
星标
33
派生
107
平均合并
14 小时 6 分钟
30 天内合并 PR
19

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

USRSE/usrse.github.io 的其他 Issue

查看 USRSE/usrse.github.io 的全部 Issue

相似的 Issue

更多 Security Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。