fix: member list RPCs hide disabled users and groups but still return their role pairs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go, grpc
調査の方向性
Start from the five list RPCs named in the issue (ListProjectUsers, ListProjectServiceUsers, ListProjectGroups, ListOrganizationUsers, ListGroupUsers). Trace how they load members via GetByIDs versus how they build role_pairs from policies. Add an opt-in IncludeDisabled (or equivalent) on UserRepository.GetByIDs without changing other callers; GroupRepository already has that filter. Include disabled members with their existing state field so the list and role_pairs match. Add a test that disables a member and asserts agreement for all five RPCs, and confirm UI/SDK callers tolerate state=disabled.
索引モデルが issue の本文から書いたものです。
説明
Problem
Five list RPCs return two things in one response:
- the member list (users, service users or groups)
role_pairs, a map of member id to roles
The RPCs are ListProjectUsers, ListProjectServiceUsers, ListProjectGroups, ListOrganizationUsers and ListGroupUsers.
The member list is loaded with GetByIDs. For users and groups, GetByIDs drops disabled rows. The role pairs are built straight from the policies, with no lookup.
A disabled user or group keeps its policies. So the response can have a role pair for an id that is missing from the list above it.
Disabling is reversible and is not a delete. These members are still real members.
Expected
The member list includes disabled users and groups. Each one carries its existing state field, set to disabled. This is the same state string (enabled or disabled) the user and group messages already return, so the API shape does not change.
The list and role_pairs then always agree. Clients that want to hide disabled members can filter on state.
Notes
GroupRepository.GetByIDsalready has anIncludeDisabledfilter.UserRepository.GetByIDshas no such option and always filters disabled users.- Other callers of
GetByIDsshould keep their current behaviour. Add an opt-in option instead of changing the default. - Check that the UI and SDK callers of these RPCs handle a
disabledstate before this ships. - Add a test that disables a member and checks the list and
role_pairsagree for all five RPCs.
- 主要言語
- Go
- スター
- 344
- フォーク
- 48
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 38
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
raystack/frontier のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
raystack/frontier の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信
-
product/backlog
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
TencentBlueKing/bk-nodemgr#3645 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
modelcontextprotocol/go-sdk#1387 ·
メンテナーはふだん 1 日以内に返信