I've added four explicit consent checkboxes to the cookie banner:
https://github.com/octfx/mediawiki-extensions-CookieWarning
Commit Message:
Four checkboxes for required, preference, statistic and marketing cookies are added to the cookie banner
{F34181174}
Those preferences are saved to a 'cookiewarning_preferences' cookie, and to the user options if the user is logged in
Cookie settings are viewable and changeable in the user preferences
{F34181169}
Five new config values are added:
- $wgCookieWarningUnsetCookies
- Unsets all cookies that are not strictly required
- $wgCookieWarningRequiredCookies
- A list of cookie names that can't be unset
- $wgCookieWarningPreferenceCookies
- A list of cookie names that belong to the preference group
- $wgCookieWarningStatisticCookies
- A list of cookie names that belong to the statistic group
- $wgCookieWarningMarketingCookies
- A list of cookie names that belong to the marketing group
All cookie groups are based on https://gdpr.eu/cookies/
These groups will only have an effect if $wgCookieWarningUnsetCookies is true.
If $wgCookieWarningUnsetCookies is set to true, each cookie name is checked against all four lists, if nothing was found, the cookie is unset.
NOTE: At this point no message is shown to the user that the banner needs to be accepted in order for login functionality to work properly when $wgCookieWarningUnsetCookies is true
The login will succeed, but upon any action the user is logged out again
Also NOTE: Cookies that are set through javascript can still be set, but will be unset each page load
Preferences from the preference cookie are saved in the database after a successful login
The maintenance script `RemoveDismissedState` can be used to force the display of the cookiebanner