Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Don't show warning header for non-standard workflows on 
login-continue
......................................................................

Don't show warning header for non-standard workflows on login-continue

When a user needs/wants to login again (reauthentication or user account 
switch),
the Login special page shows a header to explain what happened ("already logged
in" or "need to re-authenticate"). For now, the form also displays this header
for a continued login workflow (e.g. when the user needs to enter secondary 
auth-
entication data, like a one time password). This is misleading, as the user 
already
knows what and why he has to login (again). Other error/warning messages are 
maybe
not as visible as they should be.

This change omits the header message for the login-continue auth action.

Bug: T146317
Change-Id: I2115bbe7965e8d0326f71872a4d33767dd0f956b
---
M includes/specialpage/LoginSignupSpecialPage.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/312110/1

diff --git a/includes/specialpage/LoginSignupSpecialPage.php 
b/includes/specialpage/LoginSignupSpecialPage.php
index bf83e7b..ab32e46 100644
--- a/includes/specialpage/LoginSignupSpecialPage.php
+++ b/includes/specialpage/LoginSignupSpecialPage.php
@@ -508,7 +508,11 @@
                }
 
                // warning header for non-standard workflows (e.g. security 
reauthentication)
-               if ( !$this->isSignup() && $this->getUser()->isLoggedIn() ) {
+               if (
+                       !$this->isSignup() &&
+                       $this->getUser()->isLoggedIn() &&
+                       $this->authAction !== AuthManager::ACTION_LOGIN_CONTINUE
+               ) {
                        $reauthMessage = $this->securityLevel ? 
'userlogin-reauth' : 'userlogin-loggedin';
                        $submitStatus->warning( $reauthMessage, 
$this->getUser()->getName() );
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/312110
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2115bbe7965e8d0326f71872a4d33767dd0f956b
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

Reply via email to