Hide inactive chapters from the first-time signup page - #2875
Merged
Merged
Conversation
Fixes the follow-up to issue #2816: the signup step 2 page (step2_member_path) listed groups from deactivated chapters because MembersController#step2 loaded Group.coaches/Group.students without an active filter. Filter to active chapters, matching the /subscriptions fix in PR #2825, and cover both the coach and student branches in the feature spec.
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.
Follow-up to #2816: new members signing up for the first time could still subscribe to deactivated chapters. The merged /subscriptions fix (#2825) covered only the manage-subscriptions page; the signup step 2 page (
MembersController#step2) loadedGroup.coaches/Group.studentswithout an active-chapter filter, so every chapter, active or not, was offered.This PR applies the same filter used in #2825 and covers both the coach and student branches in the feature spec.
Review notes
Group'sdefault_scopejoin; adefault_scopechange would affect both call sites.SubscriptionsController#create. A crafted POST can still subscribe a member to an inactive chapter's group; that gap predates this PR and also applies to Manage subscriptions page shouldn't show ALL chapters!聽#2825.