mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 13:52:40 +01:00
T6870, Return to previous page after login via header
Summary: Fixes T6870, logging in from a public object should land on that object. Test Plan: Navigate to a maniphest task in a logged out state, login, landing page should be maniphest task. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T6870 Differential Revision: https://secure.phabricator.com/D11289
This commit is contained in:
parent
f0ade1be1c
commit
6c7e0e2807
1 changed files with 6 additions and 1 deletions
|
@ -60,12 +60,17 @@ final class PhabricatorAuthApplication extends PhabricatorApplication {
|
|||
// Don't show the "Login" item on auth controllers, since they're
|
||||
// generally all related to logging in anyway.
|
||||
} else {
|
||||
$uri = new PhutilURI('/auth/start/');
|
||||
if ($controller) {
|
||||
$path = $controller->getRequest()->getPath();
|
||||
$uri->setQueryParam('next', $path);
|
||||
}
|
||||
$item = id(new PHUIListItemView())
|
||||
->addClass('core-menu-item')
|
||||
->setName(pht('Log In'))
|
||||
// TODO: Login icon?
|
||||
->setIcon('fa-sign-in')
|
||||
->setHref('/auth/start/')
|
||||
->setHref($uri)
|
||||
->setAural(pht('Log In'))
|
||||
->setOrder(900);
|
||||
$items[] = $item;
|
||||
|
|
Loading…
Reference in a new issue