Skip to content
Snippets Groups Projects
Commit c9fdd32f authored by Théo BOYER's avatar Théo BOYER
Browse files

[AIPD] Déclencheur #884 et #885

parent a9072125
No related branches found
No related tags found
1 merge request!288[AIPD] Fix déclencheurs de l'indication d'AIPD #854, #884 et #885 et traductions
Pipeline #70029 failed
......@@ -241,25 +241,44 @@ class ConformiteTraitement implements LoggableSubject
) {
$sensitiveCount = 0;
$categoryCount = 0;
if ($treatment->isSystematicMonitoring()) {
++$categoryCount;
}
if ($treatment->isLargeScaleCollection()) {
++$categoryCount;
}
if ($treatment->isVulnerablePeople()) {
++$categoryCount;
}
if ($treatment->isDataCrossing()) {
++$categoryCount;
}
if ($treatment->isEvaluationOrRating()) {
++$categoryCount;
}
if ($treatment->isAutomatedDecisionsWithLegalEffect()) {
++$categoryCount;
}
if ($treatment->isAutomaticExclusionService()) {
++$categoryCount;
}
if ($treatment->isInnovativeUse()) {
++$categoryCount;
}
if ($categoryCount > 1) {
return true;
}
// If one of these items is true, check if there are sensitive data categories
/** @var TreatmentDataCategory $cat */
foreach ($treatment->getDataCategories() as $cat) {
++$categoryCount;
if ($categoryCount > 2) {
return true;
}
if ($cat->isSensible()) {
++$sensitiveCount;
if ($sensitiveCount > 1) {
if ($sensitiveCount > 0) {
return true;
}
}
if ($categoryCount > 0 && $sensitiveCount > 0) {
return true;
}
}
}
return false;
}
}
......@@ -176,7 +176,7 @@
{{ 'aipd.analyse_impact.action.edit'|trans }}
</a>
{% else %}
{% if not conformiteTraitement.traitement.ExemptAIPD and analyseImpact is null %}
{% if analyseImpact is null %}
<a href="{{ path('registry_conformite_traitement_start_aipd', {'id': conformiteTraitement.id}) }}">
<i aria-hidden="true" class="fa fa-chalkboard-teacher"></i>
{{ 'aipd.analyse_impact.action.create'|trans }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment