Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / auth / management / PhabricatorAuthManagementUnlockWorkflow.php
blobbcca83f65e1f353d9d01430aabf96b4cc2c5f058
1 <?php
3 final class PhabricatorAuthManagementUnlockWorkflow
4 extends PhabricatorAuthManagementWorkflow {
6 protected function didConstruct() {
7 $this
8 ->setName('unlock')
9 ->setExamples('**unlock**')
10 ->setSynopsis(
11 pht(
12 'Unlock the authentication provider config, to make it possible '.
13 'to edit the config using the web UI. Make sure to do '.
14 '**bin/auth lock** when done editing the configuration.'));
17 public function execute(PhutilArgumentParser $args) {
18 $console = PhutilConsole::getConsole();
20 $key = 'auth.lock-config';
21 $config_entry = PhabricatorConfigEntry::loadConfigEntry($key);
22 $config_entry->setValue(false);
24 // If the entry has been deleted, resurrect it.
25 $config_entry->setIsDeleted(0);
27 $config_entry->save();
29 echo tsprintf(
30 "%s\n",
31 pht('Unlocked the authentication provider configuration.'));