Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

fix: member list RPCs hide disabled users and groups but still return their role pairs

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

维护者通常 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.GetByIDs already has an IncludeDisabled filter. UserRepository.GetByIDs has no such option and always filters disabled users.
  • Other callers of GetByIDs should 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 disabled state before this ships.
  • Add a test that disables a member and checks the list and role_pairs agree for all five RPCs.
主要语言
Go
星标
344
派生
48
平均合并
1 天 22 小时
30 天内合并 PR
38

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

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

raystack/frontier 的其他 Issue

查看 raystack/frontier 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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