Page MenuHomePhabricator

Update code that deals with refreshing session info when the user logs in / log out in another tab while editing, to also handle transitioning to/from a temp user account
Closed, ResolvedPublic

Description

This feature is intended to prevent you from accidentally editing using the wrong account, or accidentally revealing your IP address by editing while logged out – for example:

  • in a pre-IP-masking world, as a "normal" user, if you log out in another browser tab (or clear your cookies, or they expire, etc.), you'll get a warning message before saving, so that you don't accidentally edit as an IP user
  • as a WMF employee with a work account and a personal account, if you log in into another account in one browser tab while having the editor open in another tab, you'll get a warning message before saving

For IP masking, we'll just consider switching temp accounts to be the same as logging in/out.

Event Timeline

Change 948664 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update messages when becoming logged-in/logged-out for IP masking

https://gerrit.wikimedia.org/r/948664

For reference, this is how the error messages currently appear in the save dialog:

image.png (769×1 px, 109 KB)

I'd appreciate suggestions on how to phrase the messages. My first proposal (in the patch) is:

BeforeAfter
Logged outWe could not save your edit because the session was no longer valid. Do you want to save this page as an anonymous user instead? Your IP address will be recorded in this page's edit history.You are no longer logged in. If you continue, <strong>your IP address will be recorded</strong> in this page's edit history.
Temp user(same as logged in)You are now using the temporary username <strong>$1</strong>. If you continue, your edit will be associated with this username.
Logged inWe could not save your edit because the session was no longer valid. You are now logged in as [[User:$1|$1]]. Your edit will be associated with this account if you save this edit.You are now logged in as <strong>[[User:$1|$1]]</strong>. If you continue, your edit will be associated with this account.

Changes:

  • Remove "We could not save your edit" – it should be obvious from the big red error message
  • Remove "because the session was no longer valid" – this is meaningless to the average user, scary, and not even necessarily true
  • Replace "anonymous user" with "no longer logged in" – as our treatment of logged-out users does not really make them anonymous
  • Add "continue" to the message, because that's the label of the button, and we can't easily change it (suggested in T190406#8507974)
  • Add bold (marked by <strong> tags) to the new username and to the words "IP address" (suggested in T190406#8511569)

Change 948664 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update messages when becoming logged-in/logged-out for IP masking

https://gerrit.wikimedia.org/r/948664