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

Add serious business string for defrocking a user (remove admin rights)

Summary:
Allow humans to understand what happened when `phabricator.serious-business` mode is enabled: The administrator role was removed from a user account.

Closes T15480

Test Plan: Enable `phabricator.serious-business` mode. Enable and disable an account as admin. Check that account's feed and the general feed.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15480

Differential Revision: https://we.phorge.it/D25298

+20 -7
+20 -7
src/applications/people/xaction/PhabricatorUserEmpowerTransaction.php
··· 56 56 '%s empowered this user as an administrator.', 57 57 $this->renderAuthor()); 58 58 } else { 59 - return pht( 60 - '%s defrocked this user.', 61 - $this->renderAuthor()); 59 + if (PhabricatorEnv::getEnvConfig('phabricator.serious-business')) { 60 + return pht( 61 + '%s removed the administrator role from this user.', 62 + $this->renderAuthor()); 63 + } else { 64 + return pht( 65 + '%s defrocked this user.', 66 + $this->renderAuthor()); 67 + } 62 68 } 63 69 } 64 70 ··· 70 76 $this->renderAuthor(), 71 77 $this->renderObject()); 72 78 } else { 73 - return pht( 74 - '%s defrocked %s.', 75 - $this->renderAuthor(), 76 - $this->renderObject()); 79 + if (PhabricatorEnv::getEnvConfig('phabricator.serious-business')) { 80 + return pht( 81 + '%s removed the administrator role from %s.', 82 + $this->renderAuthor(), 83 + $this->renderObject()); 84 + } else { 85 + return pht( 86 + '%s defrocked %s.', 87 + $this->renderAuthor(), 88 + $this->renderObject()); 89 + } 77 90 } 78 91 } 79 92