mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Remove dead "Service Lock" code from Almanac
Summary: Depends on D19315. Ref T13120. Ref T12414. See PHI145. See PHI473. I want to move Almanac services to ModularTransactions but ran into this old piece of dead/unused code along the way. Long ago, Almanac services could be individually "locked", but this didn't really work out very well. It was replaced by "Can Manage Cluster Services" in D15339 and prior changes, but not all of the old "Lock" code got cleaned up. I don't expect to restore this feature, so clean it up now. Test Plan: - Grepped for `AlmanacServiceTransaction::TYPE_LOCK`, `TYPE_LOCK`, etc. - Grepped for `updateServiceLock()`, no callsites. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13120, T12414 Differential Revision: https://secure.phabricator.com/D19316
This commit is contained in:
parent
72ab8640c5
commit
1680211702
2 changed files with 0 additions and 28 deletions
|
@ -26,20 +26,4 @@ abstract class AlmanacManagementWorkflow
|
|||
return $services;
|
||||
}
|
||||
|
||||
protected function updateServiceLock(AlmanacService $service, $lock) {
|
||||
$almanac_phid = id(new PhabricatorAlmanacApplication())->getPHID();
|
||||
|
||||
$xaction = id(new AlmanacServiceTransaction())
|
||||
->setTransactionType(AlmanacServiceTransaction::TYPE_LOCK)
|
||||
->setNewValue((int)$lock);
|
||||
|
||||
$editor = id(new AlmanacServiceEditor())
|
||||
->setActor($this->getViewer())
|
||||
->setActingAsPHID($almanac_phid)
|
||||
->setContentSource($this->newContentSource())
|
||||
->setContinueOnMissingFields(true);
|
||||
|
||||
$editor->applyTransactions($service, array($xaction));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ final class AlmanacServiceTransaction
|
|||
extends AlmanacTransaction {
|
||||
|
||||
const TYPE_NAME = 'almanac:service:name';
|
||||
const TYPE_LOCK = 'almanac:service:lock';
|
||||
|
||||
public function getApplicationTransactionType() {
|
||||
return AlmanacServicePHIDType::TYPECONST;
|
||||
|
@ -30,17 +29,6 @@ final class AlmanacServiceTransaction
|
|||
$new);
|
||||
}
|
||||
break;
|
||||
case self::TYPE_LOCK:
|
||||
if ($new) {
|
||||
return pht(
|
||||
'%s locked this service.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
} else {
|
||||
return pht(
|
||||
'%s unlocked this service.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return parent::getTitle();
|
||||
|
|
Loading…
Reference in a new issue