Hide the per-item credit preference field from non-admins once profiles are self-service
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Lĩnh vực
- authorization, full-stack
Hướng nghiên cứu
Bắt đầu bằng cách đọc app/views/shared/_author_credit_status.html.erb và app/views/shared/_author_credit_preview.html.erb, sau đó lần theo ba biểu mẫu ý tưởng dành cho người gửi và các controller của chúng. Xác nhận điều kiện tiên quyết để tự chỉnh sửa hồ sơ, hạn chế hoặc xóa trường tùy chọn và params, cập nhật hướng dẫn, đồng thời xác định liệu phần tùy chọn có còn trên /author_credit_divergences hay không.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Interim state shipped in #2093.
Why the field is there now
Credits render from the credited person's profile (Person#display_name_preference plus anonymous_contributions). Facilitators cannot edit their own profile — PersonPolicy#edit? and #update? are admin? — so the submission forms still collect a per-item credit preference as a way to record what the submitter wants.
That stored value does not drive display. It surfaces on /author_credit_divergences as a discrepancy, and an admin applies it to the person's profile so it covers everything they share. The edit forms already warn when a record diverges, linking to that page.
What to do here
Once facilitators can edit their own display preferences:
- Hide
author_credit_preferenceon the three submitter-facing idea forms (story_ideas,workshop_ideas,workshop_variation_ideas) unlessallowed_to?(:manage?, ...)— the field lives inapp/views/shared/_author_credit_status.html.erb - Drop
:author_credit_preferencefrom those three controllers' strong params, or keep it admin-only - Point submitters at their own profile instead — replace the "an admin applies it to your profile" copy in
app/views/shared/_author_credit_preview.html.erb - Revisit whether the
preferencesection of the divergences page is still needed, or only the three sections about a missingauthor_id
Related
- Self-service profile editing is the blocker:
PersonPolicy#edit?/#update?are admin-only, andperson_paramspermitsnotes,filemaker_code,created_by_idand nesteduser_attributes[:inactive], so it needs its own narrow whitelist. - The per-item
anonymousoverride is a separate legacy path the divergences page also drains.
🤖 From Claude: filed while shipping the interim step in #2093.
- Ngôn ngữ chính
- Ruby
- Star
- 15
- Fork
- 28
- Merge trung bình
- 1 ngày 12 phút
- Pull request đã merge (30 ngày)
- 262
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọ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 rubyforgood/awbw
-
blocked
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
rubyforgood/awbw#2824 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rubyforgood/awbw#2822 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rubyforgood/awbw#2160 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update callout faq defualt text when the new person subscription launchesCó thể đã có người làm @maebeale đã nhận 79 ngày trước. Đang mởblocked
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
rubyforgood/awbw#2095 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
rubyforgood/awbw#2088 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rubyforgood/awbw
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
L: javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dependabot/dependabot-core#16744 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:core-lib P2 size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày