fix(export.pdf): expert should not have access to messagerie when it was disabled

This commit is contained in:
Martin 2024-03-07 08:39:32 +01:00
parent 84f995bd47
commit f4d2f1ddf5
7 changed files with 11 additions and 8 deletions

View file

@ -374,7 +374,7 @@ prawn_document(page_size: "A4") do |pdf|
end
end
if @dossier.commentaires.present?
if @acls[:include_messagerie] && @dossier.commentaires.present?
add_title(pdf, 'Messagerie')
@dossier.commentaires.each do |commentaire|
add_message(pdf, commentaire)