-
Notifications
You must be signed in to change notification settings - Fork 1
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: creation de la table de suivi RGPD #892
base: master
Are you sure you want to change the base?
Conversation
|
||
@pytest.fixture(name="email_last_seen") | ||
def fixture_email_last_seen(db): | ||
return EmailLastSeenFactory(email=email) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je ne suis pas convaincu par l'utilisation d'une fixture pour remplacer un appel à une factory : je trouve que ça rend moins clair la situation.
Bon, j'ai voulu juste mettre des commentaires sans approve, mais j'ai cliqué au mauvais endroit. |
0893173
to
0532166
Compare
|
||
def save(self, *args, **kwargs): | ||
if self.email: | ||
self.email_hash = hashlib.sha256(self.email.encode("utf-8")).hexdigest() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En général, pour éviter les rainbow table, on sale les hash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour éviter de hasher souvent, j’aurais uniquement calculé le hash au moment de la suppression. Hasher n’est pas gratuit. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On pourrait mettre une contrainte pour avoir soit l'email soit le hash de renseigné
Description
🎸 enregistrer, pour chaque email connu, la date de dernière action, afin de déclencher l'anonymisation des contenus au bout d'un délai défini
Type de changement
🎢 Nouvelle fonctionnalité (changement non cassant qui ajoute une fonctionnalité).
🚧 technique
Points d'attention
🦺 le champ
email
est unique, bien que leemail
dansUser
ne le soit pas🦺 la méthode
save
calcul le hash de l'email🦺 la méthode
soft_delete
trace la date de deletion et supprime l'email tout en conservant le hash🦺 le hash est conservé pour comparaison ultérieure et dénombrement des déletions par jour
🦺 la méthode
seen
permet de créer ou mettre à jour le suivi d'une adresse email