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

Admin can select the same role in the options section without effect

Đang mở
#6,313 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
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
api, backend

Hướng nghiên cứu

The report identifies the organization membership detail endpoint, /api/organization-members/{membership_id}/, and the frontend organization membership resource. Start by tracing that resource's PATCH request into the backend handler and its tests. Done means selecting the current role does not save a redundant update or refresh updated_at; the issue itself says it is not open for contribution.

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

Mô tả

bug

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Target branch: unstable

Observed behavior

In the role-selection options for a user, an admin can choose the same role the user already has. The UI sends a PATCH request to the organization membership detail endpoint. The request succeeds, but the user's role remains unchanged; the membership record is still saved and its updated_at timestamp is refreshed.

Errors and logs

No error is returned. The PATCH to /api/organization-members/{membership_id}/ returns HTTP 200 with the membership, even when the submitted role matches the existing role. The backend accepts the role and saves the membership rather than rejecting or skipping the redundant update.

Expected behavior

If the selected role matches the user's current role, the system should prevent the redundant update or clearly indicate that no role change is needed. A redundant selection should not be submitted and saved as an update.

User-facing consequences

This creates confusing UX and makes a redundant selection appear to have been applied even though the user's role did not change. It also refreshes the membership's update timestamp, which can make the record appear recently changed.

Steps to reproduce

  1. Sign in as an organization admin.
  2. Open the organization.
  3. Locate the SHARING section of an organization page.
  4. Select a user in the Users section to open their role options.
  5. Choose the same role that the user already has assigned.
  6. Observe that the PATCH request succeeds, the user's role remains the same, and the membership's update timestamp is refreshed.

Context

The frontend's organization membership resource sends the role update as a PATCH to the organization-members detail route. The backend accepts the unchanged role and saves the membership.

AI usage

The bugs were gathered by a human and later turned into issue descriptions with the help of an AI assistant. The assistant was used to draft the wording and structure of the report, and the final text was reviewed and adjusted for accuracy based on the supplied bug summary.

Ngôn ngữ chính
Python
Star
192
Fork
310
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
70

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

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 learningequality/studio

Tất cả issue của learningequality/studio

Issue tương tự

Thêm issue về Python

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.