Ghost/core/server/data/migrations/versions/4.4
Kevin Ansfield 65862b437e
Migrated 'invite' to 'all' for sites that were not truly invite-only (#12907)
refs https://github.com/TryGhost/Team/issues/579

The previous `members_allow_free_signup` -> `members_signup_access` migration made a direct correlation between the toggle `true/false` to `all/invite` under the assumption that behaviour between the two settings would be identical. The assumption was incorrect and the behaviour is changing so `invite` forces invite-only mode, stopping all front-end signup to free or paid plans with the free plan now being disabled via the portal plans setting.

- check existing `members_signup_access` setting and if it's `'invite'` migrate it to `'all'` where signup should still be possible. The "invite-only" mode should only be active if certain conditions are met:
  - Stripe is not configured ("allow free member signup" off and no Stripe showed "invite-only" in portal)
  - Stripe is configured but no plans are selected in portal (no plans showed "invite-only" in portal)
- when migrating `'invite'` to `'all'`, also remove `'free'` plan from the `portal_plans` setting to avoid previously paid-only sites unexpectedly showing a free plan on signup
2021-05-04 09:50:29 +01:00
..
01-restore-free-members-signup-setting-from-backup.js 🐛 Restored correct "allow free signup" setting from backup after buggy 4.3 upgrade (#12905) 2021-05-04 09:49:33 +01:00
02-migrate-members-signup-access.js Migrated 'invite' to 'all' for sites that were not truly invite-only (#12907) 2021-05-04 09:50:29 +01:00