Edit User: the only active super user can be demoted through Role on Harper before 5.2.1
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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時間
- マージ済み PR(30日)
- 60
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
Cotal-AI/Cotal#7231 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
boxlite-ai/boxlite#2777 ·
メンテナーはふだん 1 日以内に返信