Anonymisation de l'instructeur dans la messagerie

This commit is contained in:
clemkeirua 2020-05-12 17:58:00 +02:00 committed by GitHub Action
parent 23316b6e4e
commit 77101208a4
3 changed files with 45 additions and 3 deletions

View file

@ -34,7 +34,11 @@ class Commentaire < ApplicationRecord
def redacted_email
if instructeur.present?
instructeur.email.split('@').first
if Flipper.enabled?(:hide_instructeur_email, dossier.procedure)
"Instructeur n° #{instructeur.id}"
else
instructeur.email.split('@').first
end
else
email
end