Differential D20081 Diff 47953 src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Show First 20 Lines • Show All 4,850 Lines • ▼ Show 20 Lines | return $object->getApplicationTransactionTemplate() | ||||
->setTransactionType(PhabricatorTransactions::TYPE_INLINESTATE) | ->setTransactionType(PhabricatorTransactions::TYPE_INLINESTATE) | ||||
->setIgnoreOnNoEffect(true) | ->setIgnoreOnNoEffect(true) | ||||
->setMetadataValue('inline.details', $inline_details) | ->setMetadataValue('inline.details', $inline_details) | ||||
->setOldValue($old_value) | ->setOldValue($old_value) | ||||
->setNewValue($new_value); | ->setNewValue($new_value); | ||||
} | } | ||||
private function requireMFA(PhabricatorLiskDAO $object, array $xactions) { | private function requireMFA(PhabricatorLiskDAO $object, array $xactions) { | ||||
$actor = $this->getActor(); | |||||
// Let omnipotent editors skip MFA. This is mostly aimed at scripts. | |||||
if ($actor->isOmnipotent()) { | |||||
return; | |||||
} | |||||
$editor_class = get_class($this); | $editor_class = get_class($this); | ||||
$object_phid = $object->getPHID(); | $object_phid = $object->getPHID(); | ||||
if ($object_phid) { | if ($object_phid) { | ||||
$workflow_key = sprintf( | $workflow_key = sprintf( | ||||
'editor(%s).phid(%s)', | 'editor(%s).phid(%s)', | ||||
$editor_class, | $editor_class, | ||||
$object_phid); | $object_phid); | ||||
} else { | } else { | ||||
$workflow_key = sprintf( | $workflow_key = sprintf( | ||||
'editor(%s).new()', | 'editor(%s).new()', | ||||
$editor_class); | $editor_class); | ||||
} | } | ||||
$actor = $this->getActor(); | |||||
$request = $this->getRequest(); | $request = $this->getRequest(); | ||||
if ($request === null) { | if ($request === null) { | ||||
$source_type = $this->getContentSource()->getSourceTypeConstant(); | $source_type = $this->getContentSource()->getSourceTypeConstant(); | ||||
$conduit_type = PhabricatorConduitContentSource::SOURCECONST; | $conduit_type = PhabricatorConduitContentSource::SOURCECONST; | ||||
$is_conduit = ($source_type === $conduit_type); | $is_conduit = ($source_type === $conduit_type); | ||||
if ($is_conduit) { | if ($is_conduit) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
▲ Show 20 Lines • Show All 212 Lines • Show Last 20 Lines |