Decide what an event id in a public survey link is allowed to attach to

Đang mở
#2,969 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rails, ruby
Lĩnh vực
backend, security

Hướng nghiên cứu

Read PublicFormsController#set_event, EventSurveyCompletions#offered?, and app/views/events/_form_actions_menu.html.erb, along with issue #2768. First, get a product decision on whether links should be event-specific, restricted to delivered surveys, or allow the current behavior. Then implement the chosen rule and confirm the Forms menu and event attachment behavior match that decision.

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

Mô tả

blocked event mgmt forms stakeholder-question

Blocked on a product decision — what a shared survey link may claim. No code until that's settled, because the obvious tightening would remove a link staff can use today.

What's there now

#2768 lets a standalone survey be shared as /f/:slug?event=N, and PublicFormsController#set_event validates the id against EventSurveyCompletions.survey_allowed_for_event? before attaching it to the submission.

That check is per kind of event, not per event: EventSurveyCompletions#offered? returns true in its else branch, so the attendee survey (post_event_survey) is allowed for every event, and the scholarship survey for every paid one. The id is a bearer token in a public, account-free URL, so anyone who edits it can:

  • file a survey response against any event id they like, and
  • make a Surveys column appear on that event's registrants roster (#roles counts a role as answered once any submission carries the event).

It can't touch an existing registrant's completion state — #completions is keyed on the roster's own person ids — and app/views/events/_form_actions_menu.html.erb deliberately offers the attendee-survey link on every event, which is what makes the loose rule useful.

The decision

  • Is a shared survey link meant to be event-specific and unguessable (signed/obfuscated param), or is a plain event id acceptable because the blast radius is a spurious admin-side column?
  • Should attachment narrow to events whose callouts actually deliver that survey (delivered_roles)? That is the tight rule, and it would drop the attendee-survey link from the Forms menu on every event that has no feedback callout — a visible loss for staff.
  • Or leave the rule and handle noise after the fact (e.g. let an admin detach a submission from an event)?

Each answer implies different code; pick one and the change is small.

Ngôn ngữ chính
Ruby
Star
15
Fork
28
Merge trung bình
14 giờ 29 phút
Pull request đã merge (30 ngày)
292

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.