diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-04-24 04:26:39 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2018-04-24 04:26:39 +0300 |
commit | 34c4a857126cd936ff1e9b1a4fb590306be1c879 (patch) | |
tree | 65dece270b9cbc891953f6cdc89824d825c1ca54 /plugins/PrivacyManager/Validators/VisitsDataSubject.php | |
parent | 718eb0e315e4d47c6a72185be6e8d097b1df4765 (diff) |
GDPR + Add a couple of new platform features especially around validating settings (#12558)
* add a couple of new platform features especially around validating settings
* more validators and other tweaks
* few tweaks
* allow plugins to add header script in JS tests
* some work on gdpr
* remove email feature
* menu update
* add date tooltip
* make sure privacy has its own icon
* added some text
* add opt out info
* better titles
* add some information about webserver logs
* add log import notice
* give angular some time to render
* show border around iframe
* make sure to place a notification in modal dialog if needed
* when opening a modal, make sure the top part is visible
* disable newsletter sign up by default
* command line tool to anonymize and remove previously tracked raw data
* implement some basic consent features into piwik.js
* minor tweak
* schedule entries to anonymize data in past
* let users anonymize historical data
* better overview
* better naming
* explain consent tracking
* add legitimate interest
* new menu structure for privacy
* use a proper db table for scheduled anonymizations
* add some tracker tests
* some tests and fixes
* couple of fixes and tests
* starting to add some UI tests
* more tweaks
* add missing file
* fix jslint
* have the field full width
* more tweaks
* create directory if needed
* various fixes
* fix some tests
* make sure keys will be always returned in same order
* more fixes
* fix some tests
* apply feedback from review
* fix some tests
* this might fix mysqli tests
* fix some tests
* trying to fix mysqli tests
* fix system test
* fix comment
* remove some duplicated code
* update method name
* trigger event when logs need to be deleted
* add possibility to anonymize userId and orderId
* trigger event in tracking code page
* expire consent in hours
* post another event
* update wording for privacy GDPR
* fix various ui tests
* fix some tests
* trying to fix ui tests
* trigger another test run
* fix system test
* fix some ui tests
* show a table of contents on tracking code page, fix title, add mobile apps and API
* fix ui test
* 3.5.0-b2 update
* Re-generate piwik.js
* fix job status and selector style
* make sure to include only sites with admin access
* some tweaks
* fix some ui tests
* fix some ui tests
* fix test
Diffstat (limited to 'plugins/PrivacyManager/Validators/VisitsDataSubject.php')
-rw-r--r-- | plugins/PrivacyManager/Validators/VisitsDataSubject.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/plugins/PrivacyManager/Validators/VisitsDataSubject.php b/plugins/PrivacyManager/Validators/VisitsDataSubject.php new file mode 100644 index 0000000000..bf76f058b8 --- /dev/null +++ b/plugins/PrivacyManager/Validators/VisitsDataSubject.php @@ -0,0 +1,32 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +namespace Piwik\Plugins\PrivacyManager\Validators; + +use Piwik\Validators\BaseValidator; +use Piwik\Validators\Exception; + +class VisitsDataSubject extends BaseValidator +{ + public function validate($visits) + { + if (empty($visits) || !is_array($visits)) { + throw new Exception('No list of visits given'); + } + + foreach ($visits as $index => $visit) { + if (empty($visit['idsite'])) { + throw new Exception('No idsite key set for visit at index ' . $index); + } + if (empty($visit['idvisit'])) { + throw new Exception('No idvisit key set for visit at index ' . $index); + } + } + } + +} |