fix: member list RPCs hide disabled users and groups but still return their role pairs
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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 小时
- 30 天内合并 PR
- 38
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
raystack/frontier 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 62/100
维护者通常 1 天内回复
-
Deleting an organization that has a disabled project fails and leaves it without owners可能已有人在做 @rohilsurana 于 5 天前认领。 未关闭
难度 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
-
Add Solenta未关闭
难度 1/5 1 小时以内 新手友好度 85/100
slavakurilyak/awesome-ai-agents#760 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
agent-review-finding bug
难度 2/5 1-3 小时 新手友好度 68/100
jordansmall/spindrift#5281 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
compiler-explorer/compiler-explorer#9272 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
github/github-mcp-server#3489 ·
维护者通常 4 天内回复