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

feat(accounts): Allow disabling email sending to unknown addresses #3528

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

riconnon
Copy link
Contributor

@riconnon riconnon commented Nov 18, 2023

Add a setting to the accounts app which disables sending emails to addresses which do not have an account.
For many sites this behaviour will be undesirable since it sends potentially unsolicited email to someone who has not shared it with us.

Submitting Pull Requests

General

  • Make sure you use semantic commit messages.
    Examples: "fix(google): Fixed foobar bug", "feat(accounts): Added foobar feature".
  • All Python code must formatted using Black, and clean from pep8 and isort issues.
  • JavaScript code should adhere to StandardJS.
  • If your changes are significant, please update ChangeLog.rst.
  • If your change is substantial, feel free to add yourself to AUTHORS.

Provider Specifics

In case you add a new provider:

  • Make sure unit tests are available.
  • Add an entry of your provider in test_settings.py::INSTALLED_APPS and docs/installation.rst::INSTALLED_APPS.
  • Add documentation to docs/providers/<provider name>.rst and docs/providers/index.rst Provider Specifics toctree.
  • Add an entry to the list of supported providers over at docs/overview.rst.

@riconnon riconnon force-pushed the no-unknown-account-emails branch 2 times, most recently from ad93496 to c500e18 Compare November 18, 2023 20:06
@coveralls
Copy link

coveralls commented Nov 18, 2023

Coverage Status

coverage: 95.825% (+0.03%) from 95.796%
when pulling 83bf9fc on riconnon:no-unknown-account-emails
into b0ae821 on pennersr:main.

@@ -88,6 +88,28 @@ def test_password_forgotten_no_username_hint(self):
body = mail.outbox[0].body
assert user.username not in body

@override_settings(
Copy link
Owner

Choose a reason for hiding this comment

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

These are old style unit tests. We're in a transition to pytest and should not be introducing new legacy tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll look to move these over.

allauth/account/app_settings.py Outdated Show resolved Hide resolved
@riconnon riconnon force-pushed the no-unknown-account-emails branch 3 times, most recently from 9a86397 to 265af59 Compare November 27, 2023 19:00
@riconnon riconnon requested a review from pennersr November 27, 2023 19:57
@riconnon riconnon force-pushed the no-unknown-account-emails branch from 265af59 to c6ea6bf Compare December 4, 2023 22:48
ChangeLog.rst Outdated Show resolved Hide resolved
ChangeLog.rst Show resolved Hide resolved
@riconnon riconnon force-pushed the no-unknown-account-emails branch 2 times, most recently from 3f2291c to cf97713 Compare December 10, 2023 22:16
Add a setting to the accounts app which disables sending emails to
addresses which do not have an account.
For many sites this behaviour will be undesirable since it sends
potentially unsolicited email to someone who has not shared it with us.
@riconnon riconnon force-pushed the no-unknown-account-emails branch from cf97713 to 83bf9fc Compare December 10, 2023 22:17
@riconnon riconnon requested a review from pennersr December 10, 2023 22:17
@pennersr pennersr merged commit 4b5e376 into pennersr:main Dec 10, 2023
33 checks passed
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