Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/auth/management/PhabricatorAuthManagementUnlockWorkflow.php
12256 views
1
<?php
2
3
final class PhabricatorAuthManagementUnlockWorkflow
4
extends PhabricatorAuthManagementWorkflow {
5
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.'));
15
}
16
17
public function execute(PhutilArgumentParser $args) {
18
$console = PhutilConsole::getConsole();
19
20
$key = 'auth.lock-config';
21
$config_entry = PhabricatorConfigEntry::loadConfigEntry($key);
22
$config_entry->setValue(false);
23
24
// If the entry has been deleted, resurrect it.
25
$config_entry->setIsDeleted(0);
26
27
$config_entry->save();
28
29
echo tsprintf(
30
"%s\n",
31
pht('Unlocked the authentication provider configuration.'));
32
}
33
}
34
35