Merge pull request #560 from sgmap/fix_attestation_acces_in_multiple_login

[FIX #558] Attestation: fix access with multiple logins
This commit is contained in:
LeSim 2017-07-10 10:49:29 +02:00 committed by GitHub
commit 1645ea4a9d

View file

@ -11,7 +11,7 @@
= image_tag('pdf.svg', width: '20px') = image_tag('pdf.svg', width: '20px')
%p.title= dossier.attestation.title %p.title= dossier.attestation.title
%p.delivery Délivrée le #{l(dossier.attestation.created_at, format: '%d %B %Y')} %p.delivery Délivrée le #{l(dossier.attestation.created_at, format: '%d %B %Y')}
- if user_signed_in? - if user_signed_in? && current_user == dossier.user
= link_to 'Télécharger', dossier_attestation_path(dossier), target: '_blank', class: 'btn btn-primary' = link_to 'Télécharger', dossier_attestation_path(dossier), target: '_blank', class: 'btn btn-primary'
- else - else
= link_to 'Télécharger', procedure_dossier_attestation_path(dossier.procedure, dossier), target: '_blank', class: 'btn btn-primary' = link_to 'Télécharger', procedure_dossier_attestation_path(dossier.procedure, dossier), target: '_blank', class: 'btn btn-primary'