Skip to content

Commit

Permalink
Add homologation message within approve mail for specific definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
skelz0r committed Jan 22, 2025
1 parent dc0a123 commit 98dd56e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/authorization_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def reopenable?
!next_stage?
end

def need_homologation?
%w[api_entreprise api_particulier].include?(id)
end

def instructors
User.instructor_for(id)
end
Expand Down
9 changes: 9 additions & 0 deletions app/views/authorization_request_mailer/approve.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,13 @@
)
%>

<% if @authorization_request.definition.need_homologation? %>
<%=
t(
'.need_homologation',
authorization_definition_name: @authorization_request.definition.name,
)
%>
<% end %>

<%= render partial: 'mailer/shared/applicant/footer', locals: { authorization_definition_name: @authorization_request.definition.name } %>
5 changes: 5 additions & 0 deletions config/locales/mailer.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ fr:
Votre habilitation "%{authorization_request_name}" (numéro %{authorization_request_id}) a été validée par nos équipes.
Vous pouvez consulter votre habilitation en suivant le lien suivant: %{authorization_request_url}
need_homologation: |
L'utilisation de %{authorization_definition_name} nécessite d’homologuer* l’application destinatrice des données et que votre registre de traitement mentionne les données d’appelle collectées et les données reçues.
*L’anssi vous accompagne dans la sécurisation de vos application : https://www.monservicesecurise.cyber.gouv.fr
refuse:
subject: Votre demande d'habilitation numéro %{authorization_request_id} a été refusée
description: |
Expand Down

0 comments on commit 98dd56e

Please sign in to comment.