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

Add inactive users notification and deletion jobs #3274

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

maudetes
Copy link
Contributor

@maudetes maudetes commented Feb 21, 2025

Closes datagouv/data.gouv.fr#1529

Process

We have two jobs, a notification and deletion job.

notify-inactive-users notifies all users by mail that will have their account deleted in 1 month (DAYS_BEFORE_ACCOUNT_INACTIVITY_NOTIFY_DELAY).
In this case, we set the notification date (inactive_deletion_notified_at) in User model.

delete-inactive-users deletes all users that are inactive and haven't logged in since notification date.
It also unsets the inactive_deletion_notified_at if the user has logged in since.

Notes

  1. We went with storing an inactive_deletion_notified_at to make sure we don't delete
    accounts that haven't been notified long enough in advance. Are we bulletproof with this logic?
  2. ✔️ What about user contents (Dataset, Org, etc.)? Our confidentiality policy states : "Données relatives au Contributeur qui s’inscrit"
    We can keep user contents (discussion included).
    No need to be any more explicit than this.
  3. ✔️ For harmonization, kept discussion on user (self-)deletion. A new optionnal args has been added. See udata-front related PR.
  4. ✔️ Should we add a link to contact us if they can't connect? -> Nope
  5. Can we deal with ooooold inactive users with this system? Or should we do a specific Brevo campaign? -> Yes from a juridic point of view. Still need to see how to send these at a reasonable pace.
    Added a MAX_NUMBER_OF_USER_INACTIVITY_NOTIFICATIONS config that should be set to a low value to get started and slowly increased.
  6. We currently have 70K+ user inactive since 3 years or more on the platform.
  7. How to make the + / - timedelta more readable? There is room for wording improvement here!

Copy link
Contributor

@nicolaskempf57 nicolaskempf57 left a comment

Choose a reason for hiding this comment

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

Working great except datagouv/data.gouv.fr#1663

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.

Gestion des utilisateurs inactifs depuis 3 ans
2 participants