@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Persist login instructions onto flow-specific login pages (username/password and LDAP)

Summary:
Fixes T13433. Currently, "Login Screen Instructions" in "Auth" are shown only on the main login screen. If you enter a bad password or bad LDAP credential set and move to the flow-specific login failure screen (for example, "invalid password"), the instructions vanish.

Instead, persist them. There are reasonable cases where this is highly useful and the cases which spring to mind where this is possibly misleading are fairly easy to fix by making the instructions more specific.

Test Plan:
- Configured login instructions in "Auth".
- Viewed main login screen, saw instructions.
- Entered a bad username/password and a bad LDAP credential set, got kicked to workflow sub-pages and still saw instructions (previously: no instructions).
- Grepped for other callers to `buildProviderPageResponse()` to look for anything weird, came up empty.

Maniphest Tasks: T13433

Differential Revision: https://secure.phabricator.com/D20863

+35 -28
+3 -3
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => '3c8a0668', 11 11 'conpherence.pkg.js' => '020aebcf', 12 - 'core.pkg.css' => '88366522', 12 + 'core.pkg.css' => '686ae87c', 13 13 'core.pkg.js' => '6e5c894f', 14 14 'differential.pkg.css' => '607c84be', 15 15 'differential.pkg.js' => 'a0212a0b', ··· 36 36 'rsrc/css/aphront/typeahead-browse.css' => 'b7ed02d2', 37 37 'rsrc/css/aphront/typeahead.css' => '8779483d', 38 38 'rsrc/css/application/almanac/almanac.css' => '2e050f4f', 39 - 'rsrc/css/application/auth/auth.css' => 'add92fd8', 39 + 'rsrc/css/application/auth/auth.css' => 'c2f23d74', 40 40 'rsrc/css/application/base/main-menu-view.css' => '17b71bbc', 41 41 'rsrc/css/application/base/notification-menu.css' => '4df1ee30', 42 42 'rsrc/css/application/base/phui-theme.css' => '35883b37', ··· 540 540 'aphront-tooltip-css' => 'e3f2412f', 541 541 'aphront-typeahead-control-css' => '8779483d', 542 542 'application-search-view-css' => '0f7c06d8', 543 - 'auth-css' => 'add92fd8', 543 + 'auth-css' => 'c2f23d74', 544 544 'bulk-job-css' => '73af99f5', 545 545 'conduit-api-css' => 'ce2cfc41', 546 546 'config-options-css' => '16c920ae',
+22
src/applications/auth/controller/PhabricatorAuthController.php
··· 286 286 ->appendChild($invite_list); 287 287 } 288 288 289 + 290 + final protected function newCustomStartMessage() { 291 + $viewer = $this->getViewer(); 292 + 293 + $text = PhabricatorAuthMessage::loadMessageText( 294 + $viewer, 295 + PhabricatorAuthLoginMessageType::MESSAGEKEY); 296 + 297 + if (!strlen($text)) { 298 + return null; 299 + } 300 + 301 + $remarkup_view = new PHUIRemarkupView($viewer, $text); 302 + 303 + return phutil_tag( 304 + 'div', 305 + array( 306 + 'class' => 'auth-custom-message', 307 + ), 308 + $remarkup_view); 309 + } 310 + 289 311 }
+9 -3
src/applications/auth/controller/PhabricatorAuthLoginController.php
··· 238 238 $content) { 239 239 240 240 $crumbs = $this->buildApplicationCrumbs(); 241 + $viewer = $this->getViewer(); 241 242 242 - if ($this->getRequest()->getUser()->isLoggedIn()) { 243 + if ($viewer->isLoggedIn()) { 243 244 $crumbs->addTextCrumb(pht('Link Account'), $provider->getSettingsURI()); 244 245 } else { 245 - $crumbs->addTextCrumb(pht('Log In'), $this->getApplicationURI('start/')); 246 + $crumbs->addTextCrumb(pht('Login'), $this->getApplicationURI('start/')); 247 + 248 + $content = array( 249 + $this->newCustomStartMessage(), 250 + $content, 251 + ); 246 252 } 247 253 248 254 $crumbs->addTextCrumb($provider->getProviderName()); 249 255 $crumbs->setBorder(true); 250 256 251 257 return $this->newPage() 252 - ->setTitle(pht('Log In')) 258 + ->setTitle(pht('Login')) 253 259 ->setCrumbs($crumbs) 254 260 ->appendChild($content); 255 261 }
-21
src/applications/auth/controller/PhabricatorAuthStartController.php
··· 298 298 ->setURI($auto_uri); 299 299 } 300 300 301 - private function newCustomStartMessage() { 302 - $viewer = $this->getViewer(); 303 - 304 - $text = PhabricatorAuthMessage::loadMessageText( 305 - $viewer, 306 - PhabricatorAuthLoginMessageType::MESSAGEKEY); 307 - 308 - if (!strlen($text)) { 309 - return null; 310 - } 311 - 312 - $remarkup_view = new PHUIRemarkupView($viewer, $text); 313 - 314 - return phutil_tag( 315 - 'div', 316 - array( 317 - 'class' => 'auth-custom-message', 318 - ), 319 - $remarkup_view); 320 - } 321 - 322 301 private function newEmailLoginView(array $configs) { 323 302 assert_instances_of($configs, 'PhabricatorAuthProviderConfig'); 324 303
+1 -1
webroot/rsrc/css/application/auth/auth.css
··· 57 57 } 58 58 59 59 .auth-custom-message { 60 - margin: 32px auto 64px; 60 + margin: 32px auto 48px; 61 61 max-width: 548px; 62 62 background: #fff; 63 63 padding: 16px;