Skip to content

Vie privée : anonymiser les PASS annulés, sans notification - #6553

Merged
vincentporte merged 3 commits into
masterfrom
vp/GEN-2615_anonymize_cancelled_approval
Jul 24, 2025
Merged

vincentporte merged 3 commits into
masterfrom
vp/GEN-2615_anonymize_cancelled_approval

Conversation

@vincentporte

@vincentporte vincentporte commented Jul 17, 2025 •

Copy link
Copy Markdown

🤔 Pourquoi ?

Anonymiser les données personnelles contenues dans les CancelledApproval, 24 mois après sa date de fin (end_at)

🍰 Comment ?

  • ajout du modèle AnonymizedCancelledApproval
  • ajout de la commande anonymize_cancelled_approvals
  • planification de cette commande

PRE-REQUIS #6182

@vincentporte vincentporte self-assigned this Jul 17, 2025
@vincentporte vincentporte added the ajouté Ajouté dans le changelog. label Jul 17, 2025
@notion-workspace

Copy link
Copy Markdown

Comment thread itou/archive/admin.py Resolved
Comment thread config/settings/base.py Resolved
@vincentporte
vincentporte force-pushed the vp/GEN-2615_anonymize_cancelled_approval branch 3 times, most recently from fa273e2 to b06629a Compare July 17, 2025 15:31
@vincentporte
vincentporte requested a review from tonial July 17, 2025 15:43
Comment thread itou/archive/models.py Resolved
Comment thread itou/archive/models.py Resolved
Comment thread itou/utils/constants.py Resolved
Comment thread itou/utils/constants.py
DAYS_OF_GRACE = 30
GRACE_PERIOD = datetime.timedelta(days=DAYS_OF_GRACE)
DAYS_OF_INACTIVITY = 365 * 2 - DAYS_OF_GRACE
EXPIRATION_DAYS = 365 * 2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On pourrait a priori se passer de tous ces entiers et ne garder que des timedelta.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ça peut se réfléchir dans une PR future, j'utilise les jours dans les factory, ie JobSeekerFactory(joined_days_ago=DAYS_OF_INACTIVITY, for_snapshot=True).

@vincentporte
vincentporte changed the base branch from master to vp/GEN-2481_archive_jobseeker_with_old_approval July 21, 2025 15:52
@vincentporte
vincentporte force-pushed the vp/GEN-2615_anonymize_cancelled_approval branch from b06629a to 1aa8bba Compare July 21, 2025 16:12
@vincentporte
vincentporte force-pushed the vp/GEN-2481_archive_jobseeker_with_old_approval branch from 12fbe5e to 51b36d8 Compare July 21, 2025 16:21
@vincentporte
vincentporte force-pushed the vp/GEN-2615_anonymize_cancelled_approval branch from 1aa8bba to 273eab4 Compare July 21, 2025 16:47
@vincentporte
vincentporte force-pushed the vp/GEN-2481_archive_jobseeker_with_old_approval branch from 51b36d8 to bbfdb0a Compare July 22, 2025 04:58
@vincentporte
vincentporte force-pushed the vp/GEN-2615_anonymize_cancelled_approval branch from 273eab4 to f28a482 Compare July 22, 2025 04:59

@tonial tonial left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@vincentporte
vincentporte force-pushed the vp/GEN-2481_archive_jobseeker_with_old_approval branch from bbfdb0a to 634995b Compare July 24, 2025 13:02
@vincentporte

Copy link
Copy Markdown
Author

ajouter un test sur la valeur de anonymized_at

@vincentporte
vincentporte force-pushed the vp/GEN-2481_archive_jobseeker_with_old_approval branch from 634995b to 27d4d12 Compare July 24, 2025 13:06
Base automatically changed from vp/GEN-2481_archive_jobseeker_with_old_approval to master July 24, 2025 13:26
@vincentporte
vincentporte force-pushed the vp/GEN-2615_anonymize_cancelled_approval branch from f28a482 to 317efd1 Compare July 24, 2025 14:02
@vincentporte
vincentporte force-pushed the vp/GEN-2615_anonymize_cancelled_approval branch from 317efd1 to 20310d1 Compare July 24, 2025 14:57
vincent porte added 3 commits July 24, 2025 17:14
Store non-personnal datas on CancelledApproval for long time stats purposes
CancelledApproval model has no FK. Its anonymization does not require to send email,
so we can delete all expired ones at once, without managing batch size nor notification
before anonymization.
@vincentporte
vincentporte force-pushed the vp/GEN-2615_anonymize_cancelled_approval branch from 20310d1 to 27a0209 Compare July 24, 2025 15:14
@vincentporte
vincentporte added this pull request to the merge queue Jul 24, 2025
Merged via the queue into master with commit 55e6ff7 Jul 24, 2025
@vincentporte
vincentporte deleted the vp/GEN-2615_anonymize_cancelled_approval branch July 24, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ajouté Ajouté dans le changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants