Path: blob/master/src/applications/auth/management/PhabricatorAuthManagementUnlockWorkflow.php
12256 views
<?php12final class PhabricatorAuthManagementUnlockWorkflow3extends PhabricatorAuthManagementWorkflow {45protected function didConstruct() {6$this7->setName('unlock')8->setExamples('**unlock**')9->setSynopsis(10pht(11'Unlock the authentication provider config, to make it possible '.12'to edit the config using the web UI. Make sure to do '.13'**bin/auth lock** when done editing the configuration.'));14}1516public function execute(PhutilArgumentParser $args) {17$console = PhutilConsole::getConsole();1819$key = 'auth.lock-config';20$config_entry = PhabricatorConfigEntry::loadConfigEntry($key);21$config_entry->setValue(false);2223// If the entry has been deleted, resurrect it.24$config_entry->setIsDeleted(0);2526$config_entry->save();2728echo tsprintf(29"%s\n",30pht('Unlocked the authentication provider configuration.'));31}32}333435