HomePhabricator

Add getLoginSecurityLevel() support to FormSpecialPage

Description

Add getLoginSecurityLevel() support to FormSpecialPage

The base SpecialPage will handle reauthentication automatically if you
just implement getLoginSecurityLevel() to return an appropriate string.

But it doesn't work with FormSpecialPage, and if you try calling
checkLoginSecurityLevel() manually it'll lose any post data if the
reauth happens when the form is posted.

So this patch has SpecialPage::checkLoginSecurityLevel() preserve post
data across reauth (using logic similar to that in AuthManagerSpecialPage),
and has FormSpecialPage call checkLoginSecurityLevel() in the same
way the base SpecialPage does.

It also fixes the SpecialPage logic to not call
checkLoginSecurityLevel() when the special page doesn't implement
getLoginSecurityLevel(), as was the originally-intended behavior.
Apparently almost nothing actually gets to SpecialPage::execute() or
this would probably have been noticed already.

Change-Id: Ic89dc1b6583aaecd2efe3f5109896148a188c271

Details

Provenance
AnomieAuthored on May 9 2018, 6:53 PM
TgrCommitted on Jun 5 2018, 9:10 PM
Parents
rMW05e5f781a179: Localisation updates from https://translatewiki.net.
Branches
Unknown
Tags
Unknown
ChangeId
Ic89dc1b6583aaecd2efe3f5109896148a188c271