Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / auth / management / PhabricatorAuthManagementLockWorkflow.php
blobe15069f775df6c072fcce76c7696caff28db3cc2
1 <?php
3 final class PhabricatorAuthManagementLockWorkflow
4 extends PhabricatorAuthManagementWorkflow {
6 protected function didConstruct() {
7 $this
8 ->setName('lock')
9 ->setExamples('**lock**')
10 ->setSynopsis(
11 pht(
12 'Lock authentication provider config, to prevent changes to '.
13 'the config without doing **bin/auth unlock**.'));
16 public function execute(PhutilArgumentParser $args) {
17 $console = PhutilConsole::getConsole();
19 $key = 'auth.lock-config';
20 $config_entry = PhabricatorConfigEntry::loadConfigEntry($key);
21 $config_entry->setValue(true);
23 // If the entry has been deleted, resurrect it.
24 $config_entry->setIsDeleted(0);
26 $config_entry->save();
28 echo tsprintf(
29 "%s\n",
30 pht('Locked the authentication provider configuration.'));