Feature summary:
When a user has become logged out (either, active but even through session expiration) and the database still contains data from a logged in user, delete this data.
Not sure if there is enough data in the design to determine if it came from a logged in user, but adding an anonymous vs. user flag, is the easiest to do of course. In order to deal with the 'other user' issue, we could do something like: hash userid, take the first 4 chars of the hash and use it as a vary value on the data. If these 4 chars differ, then likely it's another user. The goal is to not leak userid, but to make it likely to detect a different user than the previous user.
Another ticket theorised the if it was useful to have a small module on all pages for issues like this. I think it is. My suggestion would be to add a dedicated file for this with the most minimal checks and make it part of mediawiki.page.ready. Then you avoid adding a module, but you still have a very high likelyhood of deleting the data.
Acceptance criteria:
- When a logged out user visits a page, they should not have a high change of being able to recover an edit from a logged in user.
- When another user visits a page, they should not have a high change of being able to recover an edit from a previous user.
Use cases:
- As a user, I don't want to use a library's computer, leave and have another user find my edits.
QA notes: