1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 16:58:48 +02:00

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
This commit is contained in:
Andre Klapper 2023-06-15 21:22:10 +02:00
parent c300f0e874
commit 478012cd46

View file

@ -56,9 +56,15 @@ final class PhabricatorUserEmpowerTransaction
'%s empowered this user as an administrator.',
$this->renderAuthor());
} else {
return pht(
'%s defrocked this user.',
$this->renderAuthor());
if (PhabricatorEnv::getEnvConfig('phabricator.serious-business')) {
return pht(
'%s removed the administrator role from this user.',
$this->renderAuthor());
} else {
return pht(
'%s defrocked this user.',
$this->renderAuthor());
}
}
}
@ -70,10 +76,17 @@ final class PhabricatorUserEmpowerTransaction
$this->renderAuthor(),
$this->renderObject());
} else {
return pht(
'%s defrocked %s.',
$this->renderAuthor(),
$this->renderObject());
if (PhabricatorEnv::getEnvConfig('phabricator.serious-business')) {
return pht(
'%s removed the administrator role from %s.',
$this->renderAuthor(),
$this->renderObject());
} else {
return pht(
'%s defrocked %s.',
$this->renderAuthor(),
$this->renderObject());
}
}
}