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

Move Organization affiliation-date lock off Current.user

Đang mở
#2,833 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ó
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ả

blocked

🤖 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

Mở trong Codespaces

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.

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 rubyforgood/awbw

Tất cả issue của rubyforgood/awbw

Issue tương tự

Thêm issue về Ruby

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.