Differential D8871 Diff 21047 src/applications/auth/controller/PhabricatorAuthDowngradeSessionController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthDowngradeSessionController.php
Show All 14 Lines | if ($session->getHighSecurityUntil() < time()) { | ||||
->setTitle(pht('Normal Security Restored')) | ->setTitle(pht('Normal Security Restored')) | ||||
->appendParagraph( | ->appendParagraph( | ||||
pht('Your session is no longer in high security.')) | pht('Your session is no longer in high security.')) | ||||
->addCancelButton($panel_uri, pht('Continue')); | ->addCancelButton($panel_uri, pht('Continue')); | ||||
} | } | ||||
if ($request->isFormPost()) { | if ($request->isFormPost()) { | ||||
queryfx( | id(new PhabricatorAuthSessionEngine()) | ||||
$session->establishConnection('w'), | ->exitHighSecurity($viewer, $session); | ||||
'UPDATE %T SET highSecurityUntil = NULL WHERE id = %d', | |||||
$session->getTableName(), | |||||
$session->getID()); | |||||
return id(new AphrontRedirectResponse()) | return id(new AphrontRedirectResponse()) | ||||
->setURI($this->getApplicationURI('session/downgrade/')); | ->setURI($this->getApplicationURI('session/downgrade/')); | ||||
} | } | ||||
return $this->newDialog() | return $this->newDialog() | ||||
->setTitle(pht('Leaving High Security')) | ->setTitle(pht('Leaving High Security')) | ||||
->appendParagraph( | ->appendParagraph( | ||||
Show All 17 Lines |