Skip to content

fix: preserve platform access for stardances who turn 19#740

Open
0xDracula wants to merge 1 commit into
hackclub:mainfrom
0xDracula:fix/onboarded-age
Open

fix: preserve platform access for stardances who turn 19#740
0xDracula wants to merge 1 commit into
hackclub:mainfrom
0xDracula:fix/onboarded-age

Conversation

@0xDracula

@0xDracula 0xDracula commented Jun 30, 2026

Copy link
Copy Markdown
Member

fixes an issue where stardancers who joined before they turn 19 can't participate anymore when they turn 19

show it works?

I used rails console to mimic the situation

user = User.create!(
  email: "turns19demo@example.com",
  display_name: "demo_nineteen_#{rand(1000)}",
  age_attestation: "teen_13_18",
  experience_level: "some",
  interests: ["web_dev"],
  onboarded_at: 1.year.ago,
  verification_status: "verified",
  ysws_eligible: true
)
user.update_columns(created_at: 1.year.ago)
service = Sessions::HCALoginService.new(auth: nil, current_user: nil)
birthday = Date.current - 19.years
result = service.send(:hca_age_attestation, user, { ysws_eligible: false, birthday: birthday })
puts result # should be teen even tho they're 19 but created_at is 1 year ago

ai?
writing test file & rails console queries

closes #738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

19yos get marked as ineligible

1 participant