Florianschmidtwelzow has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/372762 )
Change subject: SpecialUserLogin: Hide rememberMe checkbox when re-authenticating ...................................................................... SpecialUserLogin: Hide rememberMe checkbox when re-authenticating With this commit, when the user needs to re-authenticate himself using the Special:UserLogin page with the force parameter set, the user login form will hide the checkbox to stay logged in. This checkbox is misleading, as, when the user needs to re-authenticate again later, the user needs to login again, no matter if the keep logged in box was ticked the last time or not. This commit only hdies the checkbox in the UI part of the authentication workflow, instead of hacking around in AuthManager itself. That means, that the RememberMeAuthenticationRequest is still a valid authentication request, which is returned by AuthManager when re-authenticating. It will also be processed when submitted as a response to AuthManager. Bug: T168557 Change-Id: I934f69b10ff8cf3647762ff3d24759b555c027c8 --- M includes/specialpage/LoginSignupSpecialPage.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/372762/1 diff --git a/includes/specialpage/LoginSignupSpecialPage.php b/includes/specialpage/LoginSignupSpecialPage.php index 04d391b..1cf3e3f 100644 --- a/includes/specialpage/LoginSignupSpecialPage.php +++ b/includes/specialpage/LoginSignupSpecialPage.php @@ -883,6 +883,11 @@ } $formDescriptor = array_filter( $coreFieldDescriptors + $formDescriptor ); + // remove rememberMe checkbox if this is a forced re-authentication T168557, as it is not + // possible to stay logged in for forced re-authentications + if ( $this->securityLevel ) { + unset( $formDescriptor['rememberMe'] ); + } return true; } -- To view, visit https://gerrit.wikimedia.org/r/372762 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I934f69b10ff8cf3647762ff3d24759b555c027c8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits