Edit User: the only active super user can be demoted through Role on Harper before 5.2.1
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
从 src/features/instance/config/users/isOnlyActiveSuperUser.ts 和 Config → Users 中的 Edit User 模态框开始;issue 指出此检查是在 #2108 中添加的。追踪 Role 字段如何处理验证并保存角色更改,然后运行相关的用户配置测试。完成标准是:无法给唯一的活跃超级用户分配不含 super_user 的角色,并且 Role 字段会说明原因。
由索引模型根据 Issue 内容生成。
描述
Problem
The Edit User modal in Config → Users locks the Active switch on for an instance's only active super user (#2108). Harper before 5.2.1 applies a deactivation that leaves no active super user, so Studio refuses it.
The Role field has no such check. Picking a role without super_user for that same user and saving sends alter_user with the new role, and Harper before 5.2.1 applies that too. The instance is left with no active super user, through a form whose Active switch says the user "can't be deactivated".
From Harper 5.2.1, alterUser refuses both changes itself: assertActiveSuperUserRemains runs whenever role or active changes.
Suggested fix
Run isOnlyActiveSuperUser (src/features/instance/config/users/isOnlyActiveSuperUser.ts, added in #2108) against role changes too. When the target is the only active super user, refuse a role without super_user and say why beside the Role field.
Review-Deferral: e696e5372625ebcd severity=minor category=data-integrity
🤖 Generated by Claude Code (Claude Opus 5.5); posted via @dawsontoth.
- 主要语言
- TypeScript
- 星标
- 5
- 派生
- 4
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 60
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
HarperFast/studio 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
HarperFast/studio#2111 ·
维护者通常 1 天内回复
-
rum
难度 2/5 1-3 小时 新手友好度 72/100
HarperFast/studio#2085 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
HarperFast/studio#2070 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
HarperFast/studio#2067 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
HarperFast/studio#2053 ·
维护者通常 1 天内回复
查看 HarperFast/studio 的全部 Issue
相似的 Issue
-
status/need-triage
难度 2/5 1-3 小时 新手友好度 76/100
google-gemini/gemini-cli#30328 · 1 条评论 ·
维护者通常 1 天内回复
-
[hooks] SessionStart injects the knowledge-update frontmatter on a CRLF checkout可能已有人在做 @abhiramshaji-cyber 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
vercel/vercel-plugin#429 ·
维护者通常 1 天内回复
-
severity:medium triage:confirmed triage:in-progress triage:reproduced
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
boxlite-ai/boxlite#2777 ·
维护者通常 1 天内回复