Ghost/ghost/core/test/unit/server/services
Simon Backx 819d0d884c
Improved email verification required checks (#16060)
fixes https://github.com/TryGhost/Team/issues/2366
refs https://ghost.slack.com/archives/C02G9E68C/p1670232405014209

Probem described in issue.

In the old MEGA flow:
- The `email_verification_required` check is now repeated inside the job

In the new email service flow:
- The `email_verification_required` is now checked (didn't happen
before)
- When generating the email batch recipients, we only include members
that were created before the email was created. That way it is
impossible to avoid limit checks by inserting new members between
creating an email and sending an email.
- We don't need to repeat the check inside the job because of the above
changes

Improved handling of large imports:
- When checking `email_verification_required`, we now also check if the
import threshold is reached (a new method is introduced in
vertificationTrigger specifically for this usage). If it is, we start
the verification progress. This is required for long running imports
that only check the verification threshold at the very end.
- This change increases the concurrency of fastq to 3 (refs
https://ghost.slack.com/archives/C02G9E68C/p1670232405014209). So when
running a long import, it is now possible to send emails without having
to wait for the import. Above change makes sure it is not possible to
get around the verification limits.

Refactoring:
- Removed the need to use `updateVerificationTrigger` by making
thresholds getters instead of fixed variables.
- Improved awaiting of members import job in regression test
2023-01-04 11:22:12 +01:00
..
adapter-manager Added JSDoc to adapter options resolver 2022-09-06 17:51:57 +08:00
api-version-compatibility Increased Vary granularity for versioned requests 2022-09-28 14:48:43 +08:00
auth Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
custom-redirects Renamed redirects to custom-redirects 2022-09-14 13:24:17 -04:00
frontend-data-service Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
link-tracking Added endpoint for fixing newsletter links 2022-10-20 17:50:02 +05:30
mail Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
mega Improved email verification required checks (#16060) 2023-01-04 11:22:12 +01:00
members Added member API for removing email from suppression list (#15867) 2022-11-23 14:41:00 +04:00
newsletters Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
notifications Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
permissions Removed defunct applyPublicRules code 2022-09-09 17:14:15 +01:00
posts Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
route-settings Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
settings Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
settings-helpers 🐛 Fixed sending emails from email domain that includes www subdomain (#15348) 2022-09-02 16:57:59 +02:00
staff Extracted sleep method to e2e framework module 2022-12-05 17:26:29 +07:00
stripe Removed apiVersions from test urlUtils 2022-09-09 13:32:30 +01:00
themes Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
url Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
users Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
webhooks Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
labs.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
limits.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
nft-oembed.test.js 🐛 Fixed OpenSea NFT OEmbeds (#15372) 2022-09-06 11:29:35 -04:00
slack.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
xmlrpc.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00