From 13e4aeb59059ede6b9e87ee03580f095d2a02403 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 29 Jan 2019 14:42:10 -0800 Subject: [PATCH] Give MFA gates a more consistent UI Summary: Depends on D20057. Currently, we show an "MFA" message on one of these and an "Error" message on the other, with different icons and colors. Use "MFA" for both, with the MFA icon / color. Test Plan: Hit both varations, saw more consistency. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20059 --- ...torHighSecurityRequestExceptionHandler.php | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php b/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php index 2a737ecf5c..7f4eddad45 100644 --- a/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php +++ b/src/aphront/handler/PhabricatorHighSecurityRequestExceptionHandler.php @@ -78,15 +78,13 @@ final class PhabricatorHighSecurityRequestExceptionHandler $form_layout = $form->buildLayoutView(); if ($is_upgrade) { - $messages = array( - pht( - 'You are taking an action which requires you to enter '. - 'high security.'), - ); + $message = pht( + 'You are taking an action which requires you to enter '. + 'high security.'); $info_view = id(new PHUIInfoView()) ->setSeverity(PHUIInfoView::SEVERITY_MFA) - ->setErrors($messages); + ->setErrors(array($message)); $dialog ->appendChild($info_view) @@ -100,12 +98,18 @@ final class PhabricatorHighSecurityRequestExceptionHandler 'period of time. When you are finished taking sensitive '. 'actions, you should leave high security.')); } else { + $message = pht( + 'You are taking an action which requires you to provide '. + 'multi-factor credentials.'); + + $info_view = id(new PHUIInfoView()) + ->setSeverity(PHUIInfoView::SEVERITY_MFA) + ->setErrors(array($message)); + $dialog + ->appendChild($info_view) ->setErrors( array( - pht( - 'You are taking an action which requires you to provide '. - 'multi-factor credentials.'), )) ->appendChild($form_layout); }