Move Organization affiliation-date lock off Current.user
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
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- ruby
- Lĩnh vực
- authorization, backend
Hướng nghiên cứu
Read CLAUDE.md’s “Authorization lives in policies” rule, then trace Organization#affiliation_dates_locked and the controller and admin service callers that save organizations. Inventory callers that currently rely on Current.user to bypass the lock, including dedupe merges; determine how each would supply the proposed flag. Done means the callers are accounted for so moving the permission decision into a policy does not break their saves.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🤖 From Claude: Organization#affiliation_dates_locked is skipped for admins by reading Current.user&.super_user? inside the model. Models shouldn't make permission decisions (see the "Authorization lives in policies" rule in CLAUDE.md, added in #2831).
Proposed fix
- The controller asks a policy rule (e.g.
OrganizationPolicy#edit_affiliation_dates?). - It hands the model a flag, the way story ideas set
organization_required.
Why blocked
- Admin-run services that save organizations (e.g. dedupe merges) currently bypass the lock through
Current.user. - With a flag, each of those callers has to set it, or its saves start failing validation.
- They need to be inventoried first.
- 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 78 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ự
-
verified
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
akitaonrails/ai-book-2026#10 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
zerocracy/judges-action#2984 ·
Maintainer thường phản hồi trong vòng 1 ngày