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

Hide "Availability" and "Calendar" on user profiles for disabled users

Summary:
See downstream <https://phabricator.wikimedia.org/T138723>. That suggestion is a little light on details, but I basically agree that showing "Availability: Available" on disabled user profiles is kind of questionable/misleading.

Just hide event information on disabled profiles, since this doesn't seem worth building a special "Availability: Who Knows, They Are Disabled, Good Luck" disabled state for.

Test Plan: Looked at disabled and non-disabled user profiles, saw Calendar stuff only on the former.

Reviewers: amckinley

Reviewed By: amckinley

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

+12
+6
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
··· 175 175 return null; 176 176 } 177 177 178 + // Don't show calendar information for disabled users, since it's probably 179 + // not useful or accurate and may be misleading. 180 + if ($user->getIsDisabled()) { 181 + return null; 182 + } 183 + 178 184 $midnight = PhabricatorTime::getTodayMidnightDateTime($viewer); 179 185 $week_end = clone $midnight; 180 186 $week_end = $week_end->modify('+3 days');
+6
src/applications/people/customfield/PhabricatorUserStatusField.php
··· 30 30 $user = $this->getObject(); 31 31 $viewer = $this->requireViewer(); 32 32 33 + // Don't show availability for disabled users, since this is vaguely 34 + // misleading to say "Availability: Available" and probably not useful. 35 + if ($user->getIsDisabled()) { 36 + return null; 37 + } 38 + 33 39 return id(new PHUIUserAvailabilityView()) 34 40 ->setViewer($viewer) 35 41 ->setAvailableUser($user);