mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01: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:
parent
c300f0e874
commit
478012cd46
1 changed files with 20 additions and 7 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue