Differential D25002 Diff 39 src/applications/almanac/management/AlmanacManagementTrustKeyWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/management/AlmanacManagementTrustKeyWorkflow.php
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | public function execute(PhutilArgumentParser $args) { | ||||
$console->writeOut( | $console->writeOut( | ||||
"**<bg:red> %s </bg>**\n\n%s\n\n%s\n\n%s", | "**<bg:red> %s </bg>**\n\n%s\n\n%s\n\n%s", | ||||
pht('IMPORTANT!'), | pht('IMPORTANT!'), | ||||
phutil_console_wrap( | phutil_console_wrap( | ||||
pht( | pht( | ||||
'Trusting a public key gives anyone holding the corresponding '. | 'Trusting a public key gives anyone holding the corresponding '. | ||||
'private key complete, unrestricted access to all data in '. | 'private key complete, unrestricted access to all data in '. | ||||
'Phabricator. The private key will be able to sign requests that '. | '%s. The private key will be able to sign requests that '. | ||||
'skip policy and security checks.')), | 'skip policy and security checks.', | ||||
PhabricatorPlatformSite::getName())), | |||||
phutil_console_wrap( | phutil_console_wrap( | ||||
pht( | pht( | ||||
'This is an advanced feature which should normally be used only '. | 'This is an advanced feature which should normally be used only '. | ||||
'when building a Phabricator cluster. This feature is very '. | 'when building a %s cluster. This feature is very '. | ||||
'dangerous if misused.')), | 'dangerous if misused.', | ||||
PhabricatorPlatformSite::getName())), | |||||
pht('This key is associated with device "%s".', $handle->getName())); | pht('This key is associated with device "%s".', $handle->getName())); | ||||
$prompt = pht( | $prompt = pht( | ||||
'Really trust this key?'); | 'Really trust this key?'); | ||||
if (!phutil_console_confirm($prompt)) { | if (!phutil_console_confirm($prompt)) { | ||||
throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
pht('User aborted workflow.')); | pht('User aborted workflow.')); | ||||
} | } | ||||
Show All 13 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0