import { RequestCluster } from '../../../request-cluster'; import { dataLocationToText, wordlist } from '../../../util'; import { ExplainerKey } from '../explainers'; import { v } from '../verbs'; import { Problem } from './problem'; export class UnknownPurposes extends Problem { getNecessaryExplainers(): ExplainerKey[] { return []; } isHostAffected(host: string) { const answers = this.answers.hosts[host]; if (!answers) { return false; } return ( ['not_mentioned', 'not_before_making_a_choice'].includes(answers.present) && ['no', 'not_sure'].includes(answers.was_processing_necessary) && (this.clusters[host].hasCookies() || this.clusters[host].exposesOrigin()) ); } qualifies(): boolean { return Object.keys(this.answers.hosts).some((host) => this.isHostAffected(host)); } getAffectedClusters(): RequestCluster[] { return Object.keys(this.answers.hosts) .filter((host) => this.isHostAffected(host)) .map((host) => this.clusters[host]); } getEmailContent({ mode, tone }: { mode: 'email' | 'report'; tone: 'official' | 'polite' }) { const _ = (key: string) => v(key, this.answers.zaimek); const affected_clusters = this.getAffectedClusters(); const has_history = affected_clusters.some((cluster) => cluster.exposesOrigin()); const has_cookies = affected_clusters.some((cluster) => cluster.hasCookies()); return ( <>

Cele przetwarzania danych

Państwa strona{' '} {mode == 'email' ? `ujawniła dane ${_('mnie')} dotyczące` : 'ujawnia dane dotyczące użytkowników'}{' '} w zakresie{' '} {wordlist([ ...(has_cookies ? ['treści plików cookies'] : []), ...(has_history ? [ mode === 'email' ? `części ${_('mojej')} historii przeglądania` : `części historii przeglądania`, ] : []), ])}{' '} podmiotom, które są właścicielami nastepujących domen:

{mode === 'email' ? ( tone === 'official' ? (

Proszę o wskazanie, jakie są cele takiego przetwarzania danych, które mnie dotyczą.

) : (

Apeluję o umieszczenie informacji na temat na Państwa stronie, aby jej użytkownicy mogli podejmować w pełni świadome wybory dotyczące przetwarzania danych ich dotyczących.

) ) : (

Zalecenie: warto dodać informacje o tym, jakie są cele ujawniania wyżej opisanych danych wyżej opisanym podmiotom trzecim.

)} ); } }