Adjust conditions for unlawful cookies
This commit is contained in:
parent
2b6346bca0
commit
54e5040348
|
@ -22,6 +22,7 @@ function generateHostPage(
|
|||
isRequired: true,
|
||||
title: `Cel ujawnienia danych właścicielowi domeny ${host}`,
|
||||
...defaultValue('present'),
|
||||
visibleIf: '{popup_type} != "none"',
|
||||
choices: [
|
||||
{
|
||||
value: 'not_mentioned',
|
||||
|
@ -140,7 +141,7 @@ function generateHostPage(
|
|||
...defaultValue('was_processing_necessary'),
|
||||
visibleIf: `{${f('legal_basis_type')}} = "legitimate_interest" or {${f(
|
||||
'present'
|
||||
)}} = "not_mentioned"`,
|
||||
)}} = "not_mentioned" or {popup_type} = "none"`,
|
||||
choices: [
|
||||
{ value: 'yes', text: 'Tak, było konieczne' },
|
||||
{ value: 'no', text: 'Nie, nie było konieczne' },
|
||||
|
|
|
@ -9,7 +9,6 @@ export type ParsedHostAnswers = ({
|
|||
| 'mentioned_in_policy'
|
||||
| 'mentioned_in_popup';
|
||||
legal_basis_type: 'consent' | 'legitimate_interes' | 'not_mentioned';
|
||||
popup_action: 'none' | 'closed_popup' | 'accept_all' | 'deny_all' | 'other';
|
||||
was_processing_necessary: 'yes' | 'no' | 'not_sure';
|
||||
} & (
|
||||
| {
|
||||
|
|
|
@ -8,6 +8,22 @@ export class UnlawfulCookieAccess extends Problem {
|
|||
getNecessaryExplainers(): ExplainerKey[] {
|
||||
return [];
|
||||
}
|
||||
|
||||
static qualifies(answers: ParsedAnswers, clusters: RequestCluster[]): boolean {
|
||||
// są cookiesy, nie było zgody, nie są konieczne do działania strony
|
||||
const cookie_clusters = Object.values(clusters).filter((c) => c.hasMarkedCookies());
|
||||
return cookie_clusters.some((cluster) => {
|
||||
const hostAnswers = answers.hosts[cluster.id];
|
||||
return (
|
||||
(hostAnswers.present == 'not_mentioned' ||
|
||||
hostAnswers.present == 'not_before_making_a_choice' ||
|
||||
['none', 'closed_popup', 'deny_all'].includes(answers.popup_action) ||
|
||||
answers.popup_type === 'none') &&
|
||||
hostAnswers.was_processing_necessary != 'yes'
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
getEmailContent() {
|
||||
const cookie_clusters = Object.values(this.clusters).filter((c) => c.hasMarkedCookies());
|
||||
const unnecessary_hosts = Object.entries(this.answers.hosts)
|
||||
|
@ -152,17 +168,4 @@ export class UnlawfulCookieAccess extends Problem {
|
|||
</>
|
||||
);
|
||||
}
|
||||
static qualifies(answers: ParsedAnswers, clusters: RequestCluster[]): boolean {
|
||||
// są cookiesy, nie było zgody, nie są konieczne do działania strony
|
||||
const cookie_clusters = Object.values(clusters).filter((c) => c.hasMarkedCookies());
|
||||
return cookie_clusters.some((cluster) => {
|
||||
const hostAnswers = answers.hosts[cluster.id];
|
||||
return (
|
||||
(hostAnswers.present == 'not_mentioned' ||
|
||||
hostAnswers.present == 'not_before_making_a_choice' ||
|
||||
['none', 'closed_popup', 'deny_all'].includes(hostAnswers.popup_action)) &&
|
||||
hostAnswers.was_processing_necessary != 'yes'
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user