New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customize privacy options on installation #6581
Conversation
…vious Piwik installs, a migration script disable it on upgrade to 2.9.
…an enrich The PrivacyManager plugins adds 2 settings to that form to let user disable (enabled by default) DoNotTrack and IP anonymization
@@ -2,6 +2,7 @@ | |||
"PrivacyManager": { | |||
"AnonymizeIpDescription": "Select \"Yes\" if you want Piwik not to track fully qualified IP-Addresses.", | |||
"AnonymizeIpInlineHelp": "Anonymize the last byte(s) of visitors IP addresses to comply with your local privacy laws\/guidelines.", | |||
"AnonymizeIpExtendedHelp": "When users visit your website, Piwik will not use the full IP address (such as 213.34.51.91) but instead Piwik will anonymise it first (to 213.34.0.0). IP address anonymisation is one of the requirements set by the privacy laws in some countries such as Germany.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you could maybe replace 213.34.51.91 and 213.34.0.0 by %1$s
and %2$s
and sprintf the values so translators cannot make typos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
nice idea 👍 PR looks good to me! |
} | ||
|
||
$view->addForm($form); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I add Piwik::checkUserHasSuperUserAccess();
in this installation step? Because it doesn't do $this->checkPiwikIsNotInstalled();
like in the other steps, so I guess anybody can go to this step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good for spotting this! 👍
…dy installed The last step is now also not optional, you need to visit the page to mark installation as finished
Customize privacy options on installation
This PR addresses #5052 and #6566 (as well as #6579 which is included in the first one).
It contains an update script for 2.9 that will disable IP anonymization if it wasn't configured before. The reason is that we change from "disabled by default" to "enabled by default", so we don't want to enable it on previous Piwik installs.
It also adds a new form in the last installation step. This form is dynamic and constructed with events so that there is no explicit mention of other plugins (as suggested by @tsteur), that means that plugins can add their own field here (but I guess it shouldn't be abused).
The form shows the default settings. The user can then submit the form which will saves his settings in the database. If he refreshes Piwik to get to the homepage somehow, then he will still use the default settings so all is good ("do not track" and "IP anonymization" are enabled by default).
Please review as it affects upgrade and installation, and I guess we really don't want to break those parts ;)