Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,967 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, grpc

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Go
Star
344
Fork
48
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
38

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của raystack/frontier

Tất cả issue của raystack/frontier

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.