Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | public function getTransactionTypes() { | ||||
$types[] = PhabricatorTransactions::TYPE_COMMENT; | $types[] = PhabricatorTransactions::TYPE_COMMENT; | ||||
$types[] = PhabricatorTransactions::TYPE_VIEW_POLICY; | $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY; | ||||
$types[] = PhabricatorTransactions::TYPE_EDIT_POLICY; | $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY; | ||||
return $types; | return $types; | ||||
} | } | ||||
protected function adjustObjectForPolicyChecks( | |||||
PhabricatorLiskDAO $object, | |||||
array $xactions) { | |||||
$copy = parent::adjustObjectForPolicyChecks($object, $xactions); | |||||
foreach ($xactions as $xaction) { | |||||
switch ($xaction->getTransactionType()) { | |||||
case PhabricatorCalendarEventHostTransaction::TRANSACTIONTYPE: | |||||
$copy->setHostPHID($xaction->getNewValue()); | |||||
break; | |||||
case PhabricatorCalendarEventInviteTransaction::TRANSACTIONTYPE: | |||||
PhabricatorPolicyRule::passTransactionHintToRule( | |||||
$copy, | |||||
new PhabricatorCalendarEventInviteesPolicyRule(), | |||||
array_fuse($xaction->getNewValue())); | |||||
break; | |||||
} | |||||
} | |||||
return $copy; | |||||
} | |||||
protected function applyFinalEffects( | protected function applyFinalEffects( | ||||
PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
array $xactions) { | array $xactions) { | ||||
// Clear the availability caches for users whose availability is affected | // Clear the availability caches for users whose availability is affected | ||||
// by this edit. | // by this edit. | ||||
$invalidate_all = false; | $invalidate_all = false; | ||||
▲ Show 20 Lines • Show All 195 Lines • Show Last 20 Lines |