mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 22:40:55 +01:00
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
This commit is contained in:
parent
d254c1f8b1
commit
13e4aeb590
1 changed files with 13 additions and 9 deletions
|
@ -78,15 +78,13 @@ final class PhabricatorHighSecurityRequestExceptionHandler
|
||||||
$form_layout = $form->buildLayoutView();
|
$form_layout = $form->buildLayoutView();
|
||||||
|
|
||||||
if ($is_upgrade) {
|
if ($is_upgrade) {
|
||||||
$messages = array(
|
$message = pht(
|
||||||
pht(
|
|
||||||
'You are taking an action which requires you to enter '.
|
'You are taking an action which requires you to enter '.
|
||||||
'high security.'),
|
'high security.');
|
||||||
);
|
|
||||||
|
|
||||||
$info_view = id(new PHUIInfoView())
|
$info_view = id(new PHUIInfoView())
|
||||||
->setSeverity(PHUIInfoView::SEVERITY_MFA)
|
->setSeverity(PHUIInfoView::SEVERITY_MFA)
|
||||||
->setErrors($messages);
|
->setErrors(array($message));
|
||||||
|
|
||||||
$dialog
|
$dialog
|
||||||
->appendChild($info_view)
|
->appendChild($info_view)
|
||||||
|
@ -100,12 +98,18 @@ final class PhabricatorHighSecurityRequestExceptionHandler
|
||||||
'period of time. When you are finished taking sensitive '.
|
'period of time. When you are finished taking sensitive '.
|
||||||
'actions, you should leave high security.'));
|
'actions, you should leave high security.'));
|
||||||
} else {
|
} 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
|
$dialog
|
||||||
|
->appendChild($info_view)
|
||||||
->setErrors(
|
->setErrors(
|
||||||
array(
|
array(
|
||||||
pht(
|
|
||||||
'You are taking an action which requires you to provide '.
|
|
||||||
'multi-factor credentials.'),
|
|
||||||
))
|
))
|
||||||
->appendChild($form_layout);
|
->appendChild($form_layout);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue