fix: member list RPCs hide disabled users and groups but still return their role pairs
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
- Lĩnh vực
- api, authentication, authorization, backend
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.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.
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của raystack/frontier
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của raystack/frontier
Issue tương tự
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
FairwindsOps/nova#484 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated-analysis code-quality cookie
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
github/gh-aw#67517 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[otelcol] print-config help text still requires the removed otelcol.printInitialConfig feature gateCó thể đã có người làm @girishkvs đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
open-telemetry/opentelemetry-collector#16143 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue load-balancing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ktrubilo9/edge-proxy#53 ·