Page MenuHomePhorge

PhabricatorAuthManagementLockWorkflow.php
No OneTemporary

PhabricatorAuthManagementLockWorkflow.php

<?php
final class PhabricatorAuthManagementLockWorkflow
extends PhabricatorAuthManagementWorkflow {
protected function didConstruct() {
$this
->setName('lock')
->setExamples('**lock**')
->setSynopsis(
pht(
'Lock authentication provider config, to prevent changes to '.
'the config without doing **bin/auth unlock**.'));
}
public function execute(PhutilArgumentParser $args) {
$console = PhutilConsole::getConsole();
$key = 'auth.lock-config';
$config_entry = PhabricatorConfigEntry::loadConfigEntry($key);
$config_entry->setValue(true);
// If the entry has been deleted, resurrect it.
$config_entry->setIsDeleted(0);
$config_entry->save();
echo tsprintf(
"%s\n",
pht('Locked the authentication provider configuration.'));
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Jan 19, 18:12 (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127315
Default Alt Text
PhabricatorAuthManagementLockWorkflow.php (837 B)

Event Timeline