Page MenuHomePhabricator

For logged-in users, store that they've consented to the CC0 licence in local storage or a hidden user preference rather than a cookie
Closed, ResolvedPublic


The current code for not showing the CC0 warning on the file page uses a cookie, whether you're logged in or logged out.

For logged-out users a cookie is as good as we can provide, but for logged-in users we should instead use a local storage or a hidden preference. This would mean that logged-in users wouldn't get re-warned when they clear their cookies. If we go with a hidden user preference, they also wouldn't get re-warned when they use a different browser.

Event Timeline

egardner moved this task from To Do to Doing on the SDC Engineering board.Mar 6 2019, 12:02 AM

I have a fix in progress, but I'm having some difficulty getting the value saved in the DB for logged-in users (storing in localstorage works fine). I'm attempting to use mw.Api.plugin.options.saveOption() but I keep getting a TypeError response from the server for some reason...

Change 494766 had a related patch set uploaded (by Eric Gardner; owner: Eric Gardner):
[mediawiki/extensions/WikibaseMediaInfo@master] Store user CC0 license agreement in localstorage or userprefs

This patch has passed CI and is ready for a final code review pass.

Change 494766 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Store user CC0 license agreement in localstorage or userprefs

greg added a project: Multimedia.Mar 7 2019, 10:59 PM
Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.Mar 8 2019, 2:45 AM
Ramsey-WMF closed this task as Resolved.Apr 23 2019, 8:56 PM

Tested on 4/23 by confirming CC0 notice did not appear while logged in even on a different computer.