mediawiki-extensions-Visual.../modules/ve-mw
Timo Tijhof 45c79f8c23 mw.ViewPageTarget: Refetch token if session expired
* Rephrased visualeditor-savedialog-error-badtoken to emphasise
  that it is the old session that become invalid, not the one
  the user started browsing with since in a different window.
* If the session changed, the user will be asked whether they
  agree to save with this new session instead.
* We explictly update mw.config so that future save attempts
  in the same window compare against the correct environment.
  Without this there are two problems when saving and then
  making a second edit in the same window and saving that:
  - It will bring up the same question again (user A -> user B),
    which is annoying.
  - If the user logged back in again (new session, but for
    user A again) it would silently try with that new token
    without asking, thus saving as user A when the user still
    thinks it switched to user B. It switching back automatically
    is not obvious since we asked them from A->B, so we should
    also ask the other way around.
  This can be reproduced by opending ve-edit logged-in, then
  logging out in a new window, save, confirm anon, save,
  open edit again, log back in in a new window, save open edit
  in the old window, confirm new logged-in, save.

Bug: 50424
Change-Id: Id055eca1886f85aeaf615f645de29898afc0373c
2013-07-15 21:40:18 +02:00
..
ce Hide ref errors inside MW transclusions 2013-07-10 23:32:30 +02:00
dm Fix uses of addPart to make them async friendly 2013-07-12 01:30:04 +00:00
init mw.ViewPageTarget: Refetch token if session expired 2013-07-15 21:40:18 +02:00
test Extend empty document check to check for meta-only data 2013-07-15 12:12:00 +01:00
ui Merge "Fix uses of addPart to make them async friendly" 2013-07-12 21:19:55 +00:00