Viewers & edit collaborators on a project can't see the list of collaborators

Đang mở
#534 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
67/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
backend

Hướng nghiên cứu

Start with the collaboration view in documentcloud/projects/views.py around line 675, then read the permission definitions in documentcloud/projects/rules.py around lines 47 and 53. Trace how the project collaborator list is gated and identify a collaborator-level check for viewing it while keeping the existing permission for settings and invitations. Done means viewers and editors can see the collaborator list, while the existing admin-only actions remain gated.

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

Mô tả

bug
Image

If projects are intended to be a collaborative space, this is a confusing user experience. If someone adds me to a project as a viewer or editor, I have no idea who added me at this point.

The collaboration view set is gated by an if here:
https://github.com/MuckRock/documentcloud/blob/d5f6a31764fafd315603503c6c75dc5b4e1c6726/documentcloud/projects/views.py#L675
projects.change_project_all is the permission which gates it.

This is defined here:
https://github.com/MuckRock/documentcloud/blob/d5f6a31764fafd315603503c6c75dc5b4e1c6726/documentcloud/projects/rules.py#L53
as anyone who holds can_change

which is defined here:
https://github.com/MuckRock/documentcloud/blob/d5f6a31764fafd315603503c6c75dc5b4e1c6726/documentcloud/projects/rules.py#L47

That means only authenticated admins of the project can see the collaborator list.

So the collaborators list is tied to the same permission as editing project settings and inviting people. That’s why only admins see it. The fix is to give the list its own collaborator-level check, and leave this permission as is I think.

Ngôn ngữ chính
Python
Star
55
Fork
10
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
22

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 MuckRock/documentcloud

Tất cả issue của MuckRock/documentcloud

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.