From 67cca8f7fa141082fc3a60fbeab6233c2ee8514b Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 14 Oct 2013 11:46:26 -0700 Subject: [PATCH] Fix breadcrumbs for login screen triggered when a logged-out user fails a policy check Summary: Ref T603. Currently, if you're logged out and try to view some object which requires you to be logged in, the login screen is missing the application breadcrumb and just says "Login". Add the application in context so we get the keys icon. Test Plan: {F69255} Reviewers: chad, btrahan, asherkin Reviewed By: chad CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7303 --- .../configuration/AphrontDefaultApplicationConfiguration.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php index 56ea38765e..c6a55ce773 100644 --- a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php +++ b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php @@ -161,6 +161,11 @@ class AphrontDefaultApplicationConfiguration // Possibly we should add a header here like "you need to login to see // the thing you are trying to look at". $login_controller = new PhabricatorAuthStartController($request); + + $auth_app_class = 'PhabricatorApplicationAuth'; + $auth_app = PhabricatorApplication::getByClass($auth_app_class); + $login_controller->setCurrentApplication($auth_app); + return $login_controller->processRequest(); }