Repository navigation
feat(tournaments): remove members who decline age disclosure - #122
Merged
Merged
Conversation
…cline age disclosure
… confirm it twice
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🚅 Deployed to the nexus-pr-122 environment in nexus
|
…p the middle step
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What changed
Backend
Models and migrations
age_disclosureandage_disclosure_aton everytournament_membershipsrow whereage_disclosure = 'declined'; no schema change. (fd68532fea68)TournamentMembership.age_disclosureis now onlyNULL(unanswered) or"consented".Schemas and routes
POST /tournaments/{id}/members/me/age-disclosure/withconsent: falsedeletes the caller's membership and their responses to the tournament's forms, then returns the no-membershipMembershipMeResponse(id: null).GET /tournaments/{id}/members/me/returnsneeds_age_consent: falsefor the owner.include_declinedquery parameter fromGET /tournaments/{id}/members/.MembershipFullResponse.age_disclosureno longer returns"declined".Logic
ACTIVE_MEMBERSHIP_CLAUSEandis_declined()fromcore/tournament/memberships.py;has_any_membership()is now a plain existence check.GET /tournaments/me/,tournament_counts()volunteer counts,with_member_counts()role counts,build_member_summary(),recompute_onboarding(), ownership transfer,GET /tournaments/{id}/forms/me/andPOST /tournaments/{id}/onboarding/progress/._no_membership_response()builds theid: nullresponse shared byGET .../members/me/and a decline.Frontend
AgeDisclosureModal: the prompt now says declining removes you, deletes your form responses and needs a new join link to come back.AgeDisclosureModal: Decline opens a danger modal ("Leave this tournament?") before anything is sent.lib/api.ts: removesincludeDeclinedfrommembersApi.listand narrowsage_disclosureto"consented" | null.Out of scope
Test plan
pytestpasses locallyAutomated
tests/api/tournament/test_memberships.py: decline deletes the membership, its lunch rows and form responses, and drops the tournament fromGET /tournaments/me/; the owner can't decline; the owner isn't prompted; a member with permissions is.test_memberships.py,test_core.py,test_admin.py,test_roles.pyandtest_member_summary.py.Manual