Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CORL-3213] premoderate and ban aliased email addresses under certain conditions #4744

Merged
merged 18 commits into from
Feb 21, 2025

Conversation

nick-funk
Copy link
Contributor

@nick-funk nick-funk commented Feb 14, 2025

What does this PR do?

  • premoderate alias email option in config
    • add option on tenant
  • users who sign up as an alias of existing user will be pre-modded
  • users who sign up as an alias, but NO existing users will NOT be pre-modded
  • user signs up with an alias of an account that is banned, will be banned

These changes will impact:

  • commenters
  • moderators
  • admins
  • developers

What changes to the GraphQL/Database Schema does this PR introduce?

Adds premoderate email alias options to Settings configs.

Does this PR introduce any new environment variables or feature flags?

No

If any indexes were added, were they added to INDEXES.md?

N/A

How do I test this PR?

  • enable the feature under Config > Admin > Moderate
  • create a new user with an alias that has never been used before
    • should not be premodded
  • create a user, then create another user that is an alias of that user
    • alias user should be premodded
  • create an alias user, then create a second alias user in same vein
    • second user should be premodded
  • create a user and ban them
    • create a new user that is an alias of the banned user, they should be banned automatically

Were any tests migrated to React Testing Library?

No

How do we deploy this PR?

  • Merge into develop
  • Turn on config option for relevant clients, customers

@nick-funk nick-funk requested review from tessalt and kabeaty February 14, 2025 07:18
Copy link

netlify bot commented Feb 14, 2025

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
🔨 Latest commit d29da85
🔍 Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/67b799e79a13f5000839c956

Copy link
Contributor

@kabeaty kabeaty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I left a few small comments/questions throughout. I did also get an error when trying to enable the new config and clicking save changes, so haven't completed manual testing yet. The error is Cannot create field 'emailAliases' in element {premoderateEmailAddress: null}

@nick-funk nick-funk marked this pull request as ready for review February 14, 2025 18:07
- refactored from the `/.../` notation and forgot to
remove the outer `/` when putting as raw string into
`RegExp`
- also updated the local auth flow ban tests to also
include the new alias ban flow if enabled
updated as per Tessa and Andrews conversations in Slack
@nick-funk nick-funk requested a review from kabeaty February 18, 2025 21:51
Copy link
Contributor

@kabeaty kabeaty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good overall! Thank you for all the updates. I left a few comments throughout. The only blocking one is that I think we need a check for the premoderate email aliases feature being enabled before banning a user because other aliases are banned.

Copy link
Contributor

@kabeaty kabeaty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, ty for the updates!

@tessalt tessalt merged commit f7756f6 into develop Feb 21, 2025
6 checks passed
@tessalt tessalt deleted the feat/CORL-3213-premoderate-email-aliases branch February 21, 2025 16:39
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.

3 participants