@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.

Restore the "Log In" menubar action

Summary:
See <https://discourse.phabricator-community.org/t/activation-link-in-welcome-mail-only-works-if-new-user-isnt-semi-logged-in/740/7>.

In T13024, I rewrote the main menu bar to hide potentially sensitive items (like notification and message counts and saved search filters) until users fully log in.

However, the "Log In" item got caught in this too. For clarity, rename `shouldAllowPartialSessions()` to `shouldRequireFullSession()` (since logged-out users don't have any session at all, so it would be a bit misleading to say that "Log In" "allows" a partial session). Then let "Log In" work again for logged-out users.

(In most cases, users are prompted to log in when they take an action which requires them to be logged in -- like creating or editing an object, or adding comments -- so this item doesn't really need to exist. However, it aligns better with user expectations in many cases to have it present, and some reasonable operations like "Check if I have notifications/messages" don't have an obvious thing to click otherwise.)

Test Plan: Viewed site in an incognito window, saw "Log In" button again. Browsed normally, saw normal menu.

Reviewers: amckinley

Reviewed By: amckinley

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

+9 -5
+4
src/applications/auth/extension/PhabricatorAuthMainMenuBarExtension.php
··· 9 9 return true; 10 10 } 11 11 12 + public function shouldRequireFullSession() { 13 + return false; 14 + } 15 + 12 16 public function getExtensionOrder() { 13 17 return 900; 14 18 }
+2 -2
src/applications/people/engineextension/PeopleMainMenuBarExtension.php
··· 9 9 return $viewer->isLoggedIn(); 10 10 } 11 11 12 - public function shouldAllowPartialSessions() { 13 - return true; 12 + public function shouldRequireFullSession() { 13 + return false; 14 14 } 15 15 16 16 public function getExtensionOrder() {
+2 -2
src/view/page/menu/PhabricatorMainMenuBarExtension.php
··· 51 51 return true; 52 52 } 53 53 54 - public function shouldAllowPartialSessions() { 55 - return false; 54 + public function shouldRequireFullSession() { 55 + return true; 56 56 } 57 57 58 58 public function isExtensionEnabledForViewer(PhabricatorUser $viewer) {
+1 -1
src/view/page/menu/PhabricatorMainMenuView.php
··· 106 106 107 107 if (!$is_full) { 108 108 foreach ($extensions as $key => $extension) { 109 - if (!$extension->shouldAllowPartialSessions()) { 109 + if ($extension->shouldRequireFullSession()) { 110 110 unset($extensions[$key]); 111 111 } 112 112 }